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 JGEPJNMCKODMDHGOBKDNEEHCCPAA.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: Sunday, May 19, 2002 6:40 PM
> To: Joel Burton
> Cc: Joe Conway; Pgsql-Hackers@Postgresql. Org
> Subject: Re: [HACKERS] Exposed function to find table in schema search
> list?
>
>
> "Joel Burton" <joel@joelburton.com> writes:
> > Is the use of regclass going to prove to be very
> > implementation-specific?
>
> Sure, but so would any other API for it.

Well, sort of, but if we had been promoting a function tableoid(text)
returns oid, we wouldn't have to make any change for the move to regclass,
would we? I mean, it's specific to PG, but a simple wrapper might outlive
the next under-the-hood change.

On a related note: is there an easy way to use this ::regclass conversion to
test if a table exists in a non-error returning way? (Can I use it in a
select statement, for instance, returning a true or false value for the
existence or non-existence of a table?)

- J.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Redhat 7.3 time manipulation bug
Next
From: "Olonichev Sergei"
Date:
Subject: How to add big amounts of data into database?