| From: | "Joel Burton" <joel(at)joelburton(dot)com> |
|---|---|
| To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | "Pgsql-Hackers(at)Postgresql(dot) Org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Exposed function to find table in schema search list? |
| Date: | 2002-05-24 19:11:43 |
| Message-ID: | JGEPJNMCKODMDHGOBKDNGEHFCPAA.joel@joelburton.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Friday, May 24, 2002 1:33 PM
> To: Joel Burton
> Cc: Pgsql-Hackers(at)Postgresql(dot) 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(at)joelburton(dot)com | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ulrich Drepper | 2002-05-24 19:15:47 | Re: Redhat 7.3 time manipulation bug |
| Previous Message | Peter Eisentraut | 2002-05-24 19:03:56 | Re: Redhat 7.3 time manipulation bug |