> > 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