Data types?

Started by Flemming Frøkjærabout 25 years ago6 messagesgeneral
Jump to latest
#1Flemming Frøkjær
flemming@froekjaer.org

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

#2Christopher Sawtell
csawtell@xtra.co.nz
In reply to: Flemming Frøkjær (#1)
Re: Data types?

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
<<--

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Sawtell (#2)
Re: 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

#4Trewern, Ben
Ben.Trewern@mowlem.com
In reply to: Tom Lane (#3)
RE: Data types?

I thought:

\dT

This should do it

Ben

Show quoted text

-----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

#5Timothy H. Keitt
Timothy.Keitt@StonyBrook.Edu
In reply to: Flemming Frøkjær (#1)
Re: Data types?

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/

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Timothy H. Keitt (#5)
Re: Re: Data types?

"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