,--- You/Andres (Fri, 7 Oct 2011 02:28:30 +0200) ----* | > a lot of cases where the database could deduce (quite easily) that a | > result column cannot be null | Could you quickly explain what exactly you want that information for? Just | because it has been done before doesn't necessarily mean its a good idea...
I am not writing a database application here (i.e. I am not storing the data). I am responding to a client requirement, basically: Given a SELECT (or possibly, simpler, a table name), tell me which columns are non-nullable? I can give the answer about the tables trivially in 'psql' (using pg_attribute.attnotnull). But it has to be done inside the C code I wrote a couple of years ago, already using libpq, preparing and describing arbitrary statements... If I could get the required information through some use of PQ* functions... But, oh well, I'll "PQexec(a-fancy-select-from-pg_attribute)". Ugly :( -- Alex -- alex-goncha...@comcast.net -- -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers