Skip site navigation (1) Skip section navigation (2)

Retrieve columntypes and checks?

From: Jesper Krogh <jesper(at)krogh(dot)cc>
To: pgsql-novice(at)postgresql(dot)org
Subject: Retrieve columntypes and checks?
Date: 2004-10-28 10:27:30
Message-ID: clqhii$pf6$1@sea.gmane.org (view raw or flat)
Thread:
Lists: pgsql-novice
Trying to convert an application from MySQL to PostgreSQL I ran into
some troubles.. 

In MySQL is it quite easy to find out which type a column is.. in
particular if a column is an "enum" so the webapplication can do
appropiate checks in javascript in advance for an insert. 

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

How do I do that? 

Any better suggestions?

Thanks. 

-- 
./Jesper Krogh, jesper(at)krogh(dot)cc



Responses

pgsql-novice by date

Next:From: Mousa.ShayaDate: 2004-10-28 12:02:06
Subject: psql question
Previous:From: Oliver FrommeDate: 2004-10-28 07:25:33
Subject: Re: serial = autoincrement = without gaps ??

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group