X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4580655119 for ; Fri, 4 Mar 2005 15:30:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95080-06 for ; Fri, 4 Mar 2005 15:30:13 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id DDBDA54DAC for ; Fri, 4 Mar 2005 15:30:11 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j24FUAI1027548; Fri, 4 Mar 2005 10:30:10 -0500 (EST) To: David.Jacques@CCRS.NRCan.gc.ca Cc: pgsql-interfaces@postgresql.org Subject: Re: Function for determining column witdhs in libpq ? In-reply-to: References: Comments: In-reply-to David.Jacques@CCRS.NRCan.gc.ca message dated "Fri, 04 Mar 2005 08:26:33 -0500" Date: Fri, 04 Mar 2005 10:30:10 -0500 Message-ID: <27547.1109950210@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/9 X-Sequence-Number: 5338 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