Re: Patch: regschema OID type

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Christensen <david(at)endpoint(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: regschema OID type
Date: 2010-01-21 18:11:01
Message-ID: 68EDC674-D0BF-46A8-80E9-564420B0E28D@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Leonardo F 2010-01-21 18:28:34 Re: About "Our CLUSTER implementation is pessimal" patch
Previous Message Tom Lane 2010-01-21 18:06:20 Re: Patch: regschema OID type