Re: User-defined types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "codeWarrior" <gpatnude(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: User-defined types
Date: 2006-04-07 19:03:08
Message-ID: 15396.1144436588@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"codeWarrior" <gpatnude(at)hotmail(dot)com> writes:
> BTW: I was thinking more along the lines of:

> SELECT PT.*, PA.* FROM pg_attribute PA
> JOIN pg_type PT ON PA.attrelid = PT.typrelid
> JOIN pg_class PC ON PC.oid = PA.attrelid
> WHERE PT.typnamespace = 2200 AND PA.attnum > 0 AND PC.relkind IN ('r', 'c',
> 'v');

> Perhaps this should be made into a view in the information_schema.....

It seems like the COLUMN_UDT_USAGE view ought to handle this ...
except perhaps that COLUMN_UDT_USAGE for some reason substitutes the
underlying type if the column type is a domain. I can't see the
justification for that --- Peter, what part of the spec led you to do
it that way? There is probably more than one way to define the spec's
notion of "user-defined types" in terms of Postgres notions, but I
don't see where you got this particular definition.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yudie Pg 2006-04-07 19:52:40 Re: Running Command Line From Trigger?
Previous Message codeWarrior 2006-04-07 18:39:55 Re: User-defined types