Re: Extracting metadata about attributes from catalog
От | Tom Lane |
---|---|
Тема | Re: Extracting metadata about attributes from catalog |
Дата | |
Msg-id | 6050.993247119@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Extracting metadata about attributes from catalog ("Bernardo Pons" <bernardo@atlas-iap.es>) |
Ответы |
RE: Extracting metadata about attributes from catalog
|
Список | pgsql-hackers |
"Bernardo Pons" <bernardo@atlas-iap.es> writes: > The problem I've found is that the attribute that stores the info about data > length (attribute atttypmod of catalog table pg_attribute) is some kind of > internal coding. For example, for an attribute varchar(100) atttypmod value > is 104; for an attribute numeric(6,0) atttypmod value is 393220. Yup. > I guess I would need some kind of function in order to get the actual lenght > for the attributes. Does this function exist? Where can I find it? In 7.1, "format_type(typeoid, typmod)" is what produces the type displays seen in psql. This may or may not be exactly what you want, but that's how the knowledge of typmod encoding is exported at the moment. regards, tom lane
В списке pgsql-hackers по дате отправления: