| From: | Shra <shravan(at)yaskatech(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | MetaData (size of datatype) |
| Date: | 2002-04-29 06:20:25 |
| Message-ID: | f02042912184301E8@yaskatech.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-committers pgsql-hackers |
Hi tom,
how to decode the atttypmod field........when i allocate 10 it shows it as 14
n for 20 it shows it as 24.......my problem is not just with
varchar........it is for all fields that has variable length .........the
same atttypmod returns -1 for integer? am confused........
I want the size allocated for each field i a table whether its a var-length
or fixed length........
Shra
On Saturday 27 April 2002 20:37, you wrote:
> Shra <shravan(at)yaskatech(dot)com> writes:
> > [ where to get declared-length info for var-length columns ]
>
> This is encoded in the atttypmod field (see PQfmod). I'd recommend
> using format_type() to decode the info, but if you don't mind possibly
> having to change your code from time to time, you could just wire
> knowledge of the interpretation of typmod into your code.
>
> In future, kindly be more selective about the lists you cross-post to.
> I generally make a practice of ignoring questions posted to the bugs
> list, for example.
>
> regards, tom lane
--
Shra
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ram | 2002-04-29 06:31:56 | Problem |
| Previous Message | Tom Lane | 2002-04-27 15:07:28 | Re: [BUGS] |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Shra | 2002-04-29 11:16:34 | Re: MetaData (size of datatype) |
| Previous Message | Tom Lane | 2002-04-29 04:10:02 | pgsql/src/bin/pg_dump pg_dump.c |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Francois Suter | 2002-04-29 08:46:49 | Re: pid gets overwritten in OSX |
| Previous Message | Tom Lane | 2002-04-29 03:57:28 | Re: pg_dump broken in cvs tip |