pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David.Jacques@CCRS.NRCan.gc.ca
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Function for determining column witdhs in libpq ?
Date: Fri, 04 Mar 2005 10:30:10 -0500
Message-ID: <27547.1109950210@sss.pgh.pa.us> (raw)
In-Reply-To: <B7F9814D6850C949947CF8DEA13477810207ABE7@s5-ccr-r2.ccrs.nrcan.gc.ca>
References: <B7F9814D6850C949947CF8DEA13477810207ABE7@s5-ccr-r2.ccrs.nrcan.gc.ca>

David.Jacques@CCRS.NRCan.gc.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



view thread (2+ messages)

Message-ID: <27547.1109950210@sss.pgh.pa.us>
Permalink:  ../27547.1109950210@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27547.1109950210@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, David.Jacques@CCRS.NRCan.gc.ca
  Subject: Re: Function for determining column witdhs in libpq ?
  In-Reply-To: <27547.1109950210@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox