RE: Extracting metadata about attributes from catalog
От | Bernardo Pons |
---|---|
Тема | RE: Extracting metadata about attributes from catalog |
Дата | |
Msg-id | LOBBIBBGKNPMBFIKNEGGEEIACCAA.bernardo@atlas-iap.es обсуждение исходный текст |
Ответ на | Re: Extracting metadata about attributes from catalog (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Extracting metadata about attributes from catalog
|
Список | pgsql-hackers |
> > 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. There's 957 functions in psql (output of \df). Would I be so lucky that none of these functions is the one that you suggested? :-( Is "format_type(typeoid, typmod)" an internal C language function of the Postgres backend? (please... please... say no :-) If so (I'm afraid it will be) the only way to extract the actual length of a varchar field or length of integer/fractional part of a numeric field would be implementing the same functions the backend uses in my PHP modules. Any other suggestion? Regards, -- Bernardo Pons
В списке pgsql-hackers по дате отправления: