Re: List of User Defined Types? - Mailing list pgsql-novice

From Tom Lane
Subject Re: List of User Defined Types?
Date
Msg-id 9914.1284731826@sss.pgh.pa.us
Whole thread Raw
In response to Re: List of User Defined Types?  (Siddharth Saha <siddharthsaha@drishti-soft.com>)
List pgsql-novice
Siddharth Saha <siddharthsaha@drishti-soft.com> writes:
> How can you determine the number of user defined types. Does the pg_type
> table has some entry which indicates that it is a user defined type and not
> a pre-defined one?

There isn't any hard and fast distinction betweem built-in and
user-defined types.

Depending on what you're doing, you might want to consider a type
"built-in" if it resides in the pg_catalog or information_schema
schemas (I think this is the definition psql's \dT uses).  Or you
could check whether the type's OID is less than 16384, which would
tell you whether it was created during initdb.

            regards, tom lane

pgsql-novice by date:

Previous
From: "Jean-Yves F. Barbier"
Date:
Subject: Re: Adding seconds to a time
Next
From: Josh Kupershmidt
Date:
Subject: Re: Unable to use VIEWS (Ok button remains shaded)