Thread: Re: How to view user defined TYPE

Re: How to view user defined TYPE

From
Goboxe
Date:
Hi,

Any help on the question below? Thanks.

On Oct 15, 6:00 pm, Goboxe <hadzramin...@gmail.com> wrote:
> Hi,
>
> Let say I created a new type:
>
> CREATE TYPE compfoo AS (f1 int, f2 text);
>
> How can I view its definition?
>
> I tried to view it in pgAdmin but seems cannot fine any node that
> display that?
>
> Thanks,
> G


Re: How to view user defined TYPE

From
Tom Lane
Date:
Goboxe <hadzramin.ar@gmail.com> writes:
>> Let say I created a new type:
>> CREATE TYPE compfoo AS (f1 int, f2 text);
>> How can I view its definition?

In psql, \d works:

regression=# CREATE TYPE compfoo AS (f1 int, f2 text);
CREATE TYPE
regression=# \d compfoo
Composite type "public.compfoo"
 Column |  Type
--------+---------
 f1     | integer
 f2     | text


            regards, tom lane