Re: Retrieve columntypes and checks? - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: Retrieve columntypes and checks?
Date
Msg-id 20041028173320.GA75259@winnie.fuhr.org
Whole thread Raw
In response to Retrieve columntypes and checks?  (Jesper Krogh <jesper@krogh.cc>)
List pgsql-novice
On Thu, Oct 28, 2004 at 10:27:30AM +0000, Jesper Krogh wrote:
>
> In PostgreSQL the enum's are converted to varchar with checks, so I need
> to get a hold on the column-type and if it's a varchar parse the check
> string for values..

Others have suggested that you let the database do the checking for
you.  But if you want to see what the column types and constraints
are, you could query the system catalogs:

http://www.postgresql.org/docs/7.4/static/catalogs.html
http://www.postgresql.org/docs/7.4/static/information-schema.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Retrieve columntypes and checks?
Next
From: Aleksandar Dezelin
Date:
Subject: Importing Microsoft Sql Server 2000