Function for determining column witdhs in libpq ?
Function for determining column witdhs in libpq ?
От:
David.Jacques@CCRS.NRCan.gc.ca
Дата:
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 functionalityin Pqftype() but that doesn't help me distiguish between a column ofVARCHAR(20) and a a column of VARCHAR(8). Is there a function in lipq to do this ? Thanks David
Re: Function for determining column witdhs in libpq ?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
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