From: | "Bernardo Pons" <bernardo(at)atlas-iap(dot)es> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RE: Extracting metadata about attributes from catalog |
Date: | 2001-06-24 10:05:13 |
Message-ID: | LOBBIBBGKNPMBFIKNEGGEEIACCAA.bernardo@atlas-iap.es |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Kreen | 2001-06-24 10:33:31 | Re: [PATCH] by request: base64 for bytea |
Previous Message | Bernardo Pons | 2001-06-24 10:05:12 | RE: Extracting metadata about attributes from catalog |