Re: Exposed function to find table in schema search list? - Mailing list pgsql-hackers

From Joel Burton
Subject Re: Exposed function to find table in schema search list?
Date
Msg-id JGEPJNMCKODMDHGOBKDNGEHFCPAA.joel@joelburton.com
Whole thread Raw
In response to Re: Exposed function to find table in schema search list?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Exposed function to find table in schema search list?
List pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Friday, May 24, 2002 1:33 PM
> To: Joel Burton
> Cc: Pgsql-Hackers@Postgresql. Org
> Subject: Re: [HACKERS] Exposed function to find table in schema search
> list?
>
> At the moment regclass conversion raises an error if the item isn't
> found; this follows the historical behavior of regproc.  We could
> possibly have it return 0 (InvalidOid) instead, but I'm not convinced
> that that's better.  In the case of regproc, not erroring out would
> lose some important error checking during initdb.

Fair enough. Is there any way to handle this error and return a false?
(People frequently ask "how can I check to see if a table exists", and not
all interfaces handle errors the same way, but everyone should know how to
deal with a table result, so that we can provide a 7.3 version of "SELECT 1
FROM pg_class where relname='xxx'".

Thanks!

- J

Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Redhat 7.3 time manipulation bug
Next
From: Tom Lane
Date:
Subject: Index tuple killing code committed