Re: Getting list of supported types in Postgres - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Getting list of supported types in Postgres
Date
Msg-id 20130815125907.GB8961@momjian.us
Whole thread Raw
In response to Re: Getting list of supported types in Postgres  (Ivan Radovanovic <radovanovic@gmail.com>)
List pgsql-general
On Thu, Aug 15, 2013 at 11:33:42AM +0200, Ivan Radovanovic wrote:
> On 08/15/13 05:23, Michael Paquier napisa:
> >On Thu, Aug 15, 2013 at 6:00 AM, Bruce Momjian<bruce@momjian.us>  wrote:
> >>Try psql -E, and run the \dT command to see the query it uses.
> >You have also the following commands:
> >- ¥dT+, all types with addition information like its size ('var' is
> >for example variable length)
> >- ¥dTS+, this includes also the catalog types
> >
> >Regards,
>
> Hi Michael and Bruce,
>
> Thank you for taking your time to reply.
>
> If I run \dTS+ that returns something that resembles information I
> need, but it is still missing info if type can have precision, and
> apparently aliases are missing (no decimal for numeric, no character
> for char and so on). Additionally it would be great if I could
> somehow also get information if type can be indexed.

Well, some of that mapping happens in src/backend/parser/gram.y,
particularly the "Numeric" rule.  The meaning of the precision/scale is
type-specific, but if you do -E and \d tablename, you can see how the
modifiers are shown for user-defined columns.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: SSL connection has been closed unexpectedly
Next
From: Stuart Ford
Date:
Subject: Re: SSL connection has been closed unexpectedly