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:02:14
Message-ID: 2A3E9245-6233-484D-BB84-76656BB8F66C@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-21 18:02:28 Re: MySQL-ism help patch for psql
Previous Message Pavel Stehule 2010-01-21 18:01:30 Re: MySQL-ism help patch for psql