query column def

From: Peter Harvey <pharvey(at)codebydesign(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: query column def
Date: 2001-08-21 18:49:54
Message-ID: 3B82AD52.B345243D@codebydesign.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi;

I am reverse engineering a PostgreSQL database by querying catalog
tables. I have run into a problem where I can not determine the exact
info used in i.e. the CREATE TABLE statement. For example; how to
determine the exact precision/length and scale used in a NUMERIC(p,s)
column def.

Looking at the PostgreSQL ODBC driver I see that it does some funky
stuff such as reporting VARCHAR(maxlen) instead of i.e. VARCHAR(50) or
whatever the column def was. So it appears that the author had similar
problems. The result is that the ODBC driver does not appear to be
absolutely accurate.

Is this information availible somewhere in the catalog tables?

Peter

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-08-21 19:22:59 Re: query column def
Previous Message Gilles DAROLD 2001-08-21 18:35:25 Re: [HACKERS] Postgresql log analyzer