> With libpq, how do you obtain column info (like type) for a table *before*
> returning a result set? For instance, knowing the column type before
> constructing an insert statement. A date will need quotes, a number won't,
> a string will, etc.
>
I usually do a 'select * from table_x where oid < 0' or something like
that to get an empty result set. This might be a stupid thing to do on
a big table, thought. You might want to select a column with an index.
Anyone have a better idea?
Actually, you should be able to get the information out of the pg_ tables.
-- cary