Data length and data precision - Mailing list pgsql-sql

From Bart van Houdt
Subject Data length and data precision
Date
Msg-id CECE69D480C32F49891F27ED3E49C38C010DAA68@nthvsexch02.interaccess.nl
Whole thread Raw
Responses Re: Data length and data precision  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-sql
<p><font size="2">Hi all,<br /><br /> I'm trying to write some code to make a 'fingerprint' of a database. This to
comparea customer database with a reference database of our own.<br /> Therefore I'm trying to retrieve information
likethis:<br /> -Table name<br />   pg_class.relname where relkind = 'r'<br /> -Column name<br />   pg_attribute where
attrelid= pg_class.oid<br /> -Data type<br />   pg_type where oid = pg_attribute.atttypid<br /> -Data length<br />   if
pg_attribute.atttypmod= -1 then pg_type.typlen<br />   else pg_attribute.atttypmod<br /> -Data precision<br />   No
clue<br/> -Nullable<br />   pg_attribute.attnotnull<br /><br /> As you can see I'm missing the data precision (e.g.
numeric(19,2)) and I'm not entirely sure about the data length.<br /><br /> Can anyone tell me where to find the data
precisionof a column?<br /> And can anyone tell me if I get the data length from the correct places?<br /><br /> Thanks
inadvance,<br /><br /> Bart</font> 

pgsql-sql by date:

Previous
From: Raj Mathur
Date:
Subject: Re: Must I use DISTINCT?
Next
From: "A. Kretschmer"
Date:
Subject: Re: Data length and data precision