Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable
От | Alex Goncharov |
---|---|
Тема | Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable |
Дата | |
Msg-id | E1RByaN-000DPv-M4@hanssachs.home обсуждение исходный текст |
Ответ на | Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable
|
Список | pgsql-hackers |
,--- 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-goncharov@comcast.net --
В списке pgsql-hackers по дате отправления: