Thread: Data types?

Data types?

From
Flemming Frøkjær
Date:
How do i find out what data types are available in PostgreSQL.
I know there are more that the ones in the docs, and i ones saw a command
to list all the data types. And there was a lot more than the ones from the
docs.

\Flemming


Re: Data types?

From
Christopher Sawtell
Date:
On Thu, 08 Mar 2001 12:29, Flemming Frøkjær wrote:
> How do i find out what data types are available in PostgreSQL.
> I know there are more that the ones in the docs, and i ones saw a
> command to list all the data types. And there was a lot more than the
> ones from the docs.

Look in the regression tests. Interesting stuff.

--
Sincerely etc.,

 NAME       Christopher Sawtell
 CELL PHONE 021 257 4451
 ICQ UIN    45863470
 EMAIL      csawtell @ xtra . co . nz
 CNOTES     ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz

 -->> Please refrain from using HTML or WORD attachments in e-mails to me
<<--


Re: Data types?

From
Tom Lane
Date:
Christopher Sawtell <csawtell@xtra.co.nz> writes:
> On Thu, 08 Mar 2001 12:29, Flemming Fr�kj�r wrote:
>> How do i find out what data types are available in PostgreSQL.

> Look in the regression tests. Interesting stuff.

And there's always "select * from pg_type" ... not to mention the source
code ...

            regards, tom lane

RE: Data types?

From
"Trewern, Ben"
Date:

I thought:

\dT

This should do it

Ben

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: 08 March 2001 01:00
> To: Christopher Sawtell
> Cc: Flemming Frøkjær; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Data types?
>
>
> Christopher Sawtell <csawtell@xtra.co.nz> writes:
> > On Thu, 08 Mar 2001 12:29, Flemming Frøkjær wrote:
> >> How do i find out what data types are available in PostgreSQL.
>
> > Look in the regression tests. Interesting stuff.
>
> And there's always "select * from pg_type" ... not to mention
> the source
> code ...
>
>                       regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

Re: Data types?

From
"Timothy H. Keitt"
Date:
If you need to know the OID of a type (e.g., for use in libpq) I find

    select oid, typname from pg_type

useful.  By the way, what are all those types prefixed with an
underscore?  Are these ever delivered to a client?

Tim

Tom Lane wrote:

> Christopher Sawtell <csawtell@xtra.co.nz> writes:
>
>> On Thu, 08 Mar 2001 12:29, Flemming Frøkjær wrote:
>>
>>> How do i find out what data types are available in PostgreSQL.
>>
>
>> Look in the regression tests. Interesting stuff.
>
>
> And there's always "select * from pg_type" ... not to mention the source
> code ...
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html


--
Timothy H. Keitt
Department of Ecology and Evolution
State University of New York at Stony Brook
Phone: 631-632-1101, FAX: 631-632-7626
http://life.bio.sunysb.edu/ee/keitt/


Re: Re: Data types?

From
Tom Lane
Date:
"Timothy H. Keitt" <Timothy.Keitt@StonyBrook.Edu> writes:
> By the way, what are all those types prefixed with an
> underscore?  Are these ever delivered to a client?

If foo is a simple type, then (by convention) _foo is an array of foo,
ie, it's the internal name for "foo[]".

"CREATE TYPE foo" makes the array type _foo as well...

            regards, tom lane