I'm trying to implement getUDT for the jdbc driver.

It requires the basetype of a type.

If I do create type testint8 as (i int8) and then select typbasetype
from pg_type where typname='testint8' the value is 0?

While I'm asking how can I find all of the user defined types, assuming
that the user is the owner of the cluster. I see that pg_dump can do
this ?

-- 
Dave Cramer
519 939 0336
ICQ # 14675561


Tue, 18 May 2004 07:51:36 -0400
Dave Cramer <pg@fastcrypt.com>
question about information_schema


On Tue, 18 May 2004, Dave Cramer wrote:

> If I do create type testint8 as (i int8) and then select typbasetype
> from pg_type where typname='testint8' the value is 0?

You've created a complex type here, not a domain.  See typtype and 
typrelid for this case.

create domain testint8 as int8;  will do what you were expecting.

Kris Jurka

Tue, 18 May 2004 09:06:36 -0500 (EST)
Kris Jurka <books@ejurka.com>
Re: question about information_schema
Dave Cramer <pg@fastcrypt.com> writes:
> While I'm asking how can I find all of the user defined types, assuming
> that the user is the owner of the cluster. I see that pg_dump can do
> this ?

IIRC, what pg_dump actually does is look for types that are not in the
pg_catalog schema.  Plus you probably want to exclude composite types
other than "standalone" ones (ie, all those whose associated pg_class
entry has a relkind other than COMPOSITE_TYPE).

			regards, tom lane

Tue, 18 May 2004 20:28:01 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: question about information_schema 