"Dann Corbit" <DCorbit(at)connx(dot)com> writes:
> In other words, I will be passed a SQL query. I don't want to have to
> parse it myself.
> Rather, I want to know (for the bound columns) if a column is nullable
> or not.
> Is the functionality available in [for example] libpq?
As of 7.4, see PQftable() and PQftablecol(), and look into pg_attribute
to see whether the column is marked NOTNULL.
regards, tom lane