Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable
Дата
Msg-id CAHyXU0w7JSfFok7wudD+3heiEbMMHXjeaGHGEeY95-SNRhm+EA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
On Thu, Oct 6, 2011 at 4:16 PM, Florian Pflug <fgp@phlo.org> wrote:
> Sure, but there are still a lot of cases where the database could deduce
> (quite easily) that a result column cannot be null. Other databases do
> that - for example, I believe to remember that Microsoft SQL Server preserves
> NOT NULL constraints if you do
>
>  CREATE TABLE bar AS SELECT * from foo;
>
> So the question makes perfect sense, and the answer is: No, postgres currently
> doesn't support that, i.e. doesn't deduce the nullability of result columns,
> not even in the simplest cases.

hm, good point.  not sure how it's useful though.  I suppose an
application could leverage that for validation purposes, but that's a
stretch I think.

merlin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Florian Pflug
Дата:
Сообщение: Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)