Re: Function for determining column witdhs in libpq ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David(dot)Jacques(at)CCRS(dot)NRCan(dot)gc(dot)ca
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Function for determining column witdhs in libpq ?
Date: 2005-03-04 15:30:10
Message-ID: 27547.1109950210@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

David(dot)Jacques(at)CCRS(dot)NRCan(dot)gc(dot)ca writes:
> I need to build a create table statement based on the some of the field
> names I retreive from an existing table. I have made use of the
> functionality
> in Pqftype() but that doesn't help me distiguish between a column of
> VARCHAR(20) and a a column of VARCHAR(8). Is there a function in lipq to do
> this ?

PQfmod returns the typmod of the column, which encodes this information.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message b t 2005-03-04 18:12:35 Fwd: Re: how to parse an proargtypes array?
Previous Message Tom Lane 2005-03-04 15:16:46 Re: how to parse an proargtypes array?