Data length and data precision

Поиск
Список
Период
Сортировка
От Bart van Houdt
Тема Data length and data precision
Дата
Msg-id CECE69D480C32F49891F27ED3E49C38C010DAA68@nthvsexch02.interaccess.nl
обсуждение исходный текст
Ответы Re: Data length and data precision  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список 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 по дате отправления:

Предыдущее
От: Raj Mathur
Дата:
Сообщение: Re: Must I use DISTINCT?
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Data length and data precision