Re: Patch: regschema OID type - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Patch: regschema OID type
Date
Msg-id 68EDC674-D0BF-46A8-80E9-564420B0E28D@kineticode.com
Whole thread Raw
In response to Re: Patch: regschema OID type  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Patch: regschema OID type
Next
From: Leonardo F
Date:
Subject: Re: About "Our CLUSTER implementation is pessimal" patch