Re: Patch: regschema OID type

David E. Wheeler <david@kineticode.com>

From: "David E. Wheeler" <david@kineticode.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Christensen <david@endpoint.com>, pgsql-hackers@postgresql.org
Date: 2010-01-21T18:11:01Z
Lists: pgsql-hackers
On Jan 21, 2010, at 10:06 AM, Tom Lane wrote:

> Well, without a context that explains *why* you're doing that, it's hard
> to consider what a better solution would look like.  Personally I
> usually prefer solutions involving WHERE oid = 'foo.bar'::regclass,
> because that scales easily to either providing or omitting the schema
> reference.

It never occurred to me. And does `oid = bar::regclass` return true if bar is in a schema not in the search path?

But yeah, I need to avoid errors, too.

> If you're trying to avoid throwing an error on bad schema name,
> a regschema type would not help you.

Good point.

Best,

David