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

From David E. Wheeler
Subject Re: Patch: regschema OID type
Date
Msg-id 2A3E9245-6233-484D-BB84-76656BB8F66C@kineticode.com
Whole thread Raw
In response to Re: Patch: regschema OID type  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Patch: regschema OID type  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Jan 21, 2010, at 9:57 AM, Tom Lane wrote:

> Schema names of what?  It sounds to me like you're failing to use the
> existing regfoo types in appropriate places ...

The names of schemas in which to find functions, tables, views, triggers, etc. etc. I have lots of stuff like this:
       SELECT true         FROM pg_catalog.pg_namespace n         JOIN pg_catalog.pg_class c ON n.oid = c.relnamespace
     WHERE c.relkind = $1          AND n.nspname = $2          AND c.relname = $3 

I'd love to instead do something like:
       SELECT true         FROM pg_catalog.pg_class c        WHERE c.relkind = $1          AND
c.relnamespace::regschema= $2          AND c.relname = $3 

Best,

David

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: MySQL-ism help patch for psql
Next
From: David Christensen
Date:
Subject: Re: Patch: regschema OID type