Re: Why does app fail?

From: "Paul Simpson" <Paul(dot)Simpson(at)spgs(dot)org>
To: < <pgsql-general(at)postgresql(dot)org>>
Subject: Re: Why does app fail?
Date: 2004-02-24 16:40:27
Message-ID: s03b7ea6.089@spgs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok, I've done that and it would appear to be a table naming issue...

When I look at the logfile at the point where a table is creates, I get the following lines (for each table, as far as I can tell, although the third line only appears for some):-

select relname, nspname, relkind from pg_catalog.pg_class, pg_catalog.pg_namespace where relkind in ('r', 'v')and nspname like 'public' and relname like 'TTATTASSOC' and relname !~ '^pg_|^dd_' and pg_namespace.oid = relnamespace order by nspname, relname

Create Table TTATTASSOC (AssocId varchar(10), SetId varchar(10), SlotId int4)

select u.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull,c.relhasrules, c.relkind from pg_catalog.pg_namespace u, pg_catalog.pg_class c, pg_catalog.pg_attribute a, pg_catalog.pg_type t where u.oid = c.relnamespace and (not a.attisdropped) and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname = 'TTATTASSOC' and u.nspname = 'public' order by u.nspname, c.relname, attnum

select relname, nspname, relkind from pg_catalog.pg_class, pg_catalog.pg_namespace where relkind in ('r', 'v') and nspname like 'public' and relname like 'TTATTASSOC' and relname !~ '^pg_|^dd_' and pg_namespace.oid = relnamespace order by nspname, relname

If I am correct (comments please) then I assume it is looking for the existence of the table, when it doesn't find it, it is creating it. I'm not entirely sure what the third line does, but the fourth seems to be checking again for the table's existence.

I have run the statements manually and they all seem to work, however the first (and fourth) always return zero rows. If I replace the table name with a lower case version, then I get one row returned.

I have, therefore, come to the conclusion that the app requires table names in Upper case. How can I force this to work?

Sorry for the long question...!

Paul

>>> Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net> 24/02/2004 12:02:30 >>>
On Tuesday 24 February 2004 16:51, Paul Simpson wrote:
> 1) If there is a log somewhere showing failed requests, I might be able to
> see what the application is trying to do and then figure out a way around
> it.

You can log in every query server is executing. You need to enable the
corresponding log statement in pg_hba.conf. I think it is called
log_statement.

And of course, don't throw away server logs. If they are redirected
to /dev/null, they are useless anyways..

I am sure you will find lot of information in there..

HTH

Shridhar

ABOUT THIS E-MAIL
The information contained within this e-mail is privileged, confidential and protected from disclosure.

Any opinions expressed in this electronic communication do not necessarily reflect official policy of St Paul's Girls' School.

If you are not the intended recipient of this document or any part then please:

1) : inform the sender at the above address
2) : delete this e-mail immediately
3) : do not take copies nor disclose the contents of this document to anyone

PUPILS' COMMUNICATIONS
Only Senior School pupils of St Paul's Girls' School are permitted to send electronic mail and then only via our controlled system.
It is contrary to school rules for any other pupil to do so and they are regularly reminded of this fact.

VIRUS PROTECTION
All electronic mail traffic sent from this establishment is monitored and scanned for viruses prior to sending.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-02-24 16:59:04 Re: dynamic views
Previous Message Ed L. 2004-02-24 16:29:53 Re: Found this in the server log on MAC OSX