Re: OIDs of data types - Mailing list pgsql-novice

From Tom Lane
Subject Re: OIDs of data types
Date
Msg-id 17709.1054219955@sss.pgh.pa.us
Whole thread Raw
In response to OIDs of data types  ("M. Bastin" <marcbastin@mindspring.com>)
List pgsql-novice
"M. Bastin" <marcbastin@mindspring.com> writes:
> I have been using the docs for about a month now, but I still haven't
> found where to find  a table with the field types, their matching
> OIDs, and type modifiers.

select oid, typname from pg_type;

> If anyone could show me where to find this, I would appreciate it a
> lot.  (I also still don't know what a "type modifier" is.  If anyone
> can elaborate...)

Type-specific additional information, for example the max length for
a CHARACTER(n) column or the precision for a TIMESTAMP(n) column.
This is poorly documented, but you can figure out the encoding by
experimentation --- there are only a very small number of types that use
typmod, since by definition special type declaration syntax is needed
for each such type.

            regards, tom lane

pgsql-novice by date:

Previous
From: "M. Bastin"
Date:
Subject: Re: MD5 salt
Next
From: Tom Lane
Date:
Subject: Re: MD5 salt