Re: Exposed function to find table in schema search list?

Поиск
Список
Период
Сортировка
От Joel Burton
Тема Re: Exposed function to find table in schema search list?
Дата
Msg-id JGEPJNMCKODMDHGOBKDNGEHFCPAA.joel@joelburton.com
обсуждение исходный текст
Ответ на Re: Exposed function to find table in schema search list?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Exposed function to find table in schema search 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Redhat 7.3 time manipulation bug
Следующее
От: Tom Lane
Дата:
Сообщение: Index tuple killing code committed