Re: NOT NULL with CREATE TYPE

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: NOT NULL with CREATE TYPE
Дата
Msg-id 1244485108.21727.28.camel@monkey-cat.sm.truviso.com
обсуждение исходный текст
Ответ на Re: NOT NULL with CREATE TYPE  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: NOT NULL with CREATE TYPE  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
On Sat, 2009-06-06 at 15:03 -0400, Merlin Moncure wrote:
> sql functions are pretty inflexible...even with recent even with
> recent advancements like varargs and default parameters they are
> designed to do a very particular thing...and insert/update tend to be
> fairly generic in how they operate.
>

I think Jean was using that as an example to show how attnotnull is
sometimes invisible to the application, and the same would be true for a
view.

For instance, let's say you have:

create table foo(i int not null);
create view foo_v1 as select i from foo where i > 5;
create view foo_v2 as select sum(i) as i from foo;

Logically speaking, foo.i is not nullable, foo_v1.i is not nullable, but
foo_v2.i _is_ nullable. The application has no good way to know that.

Regards,
    Jeff Davis



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

Предыдущее
От: Gerhard Wiesinger
Дата:
Сообщение: Re: Sum of multiplied deltas
Следующее
От: "Shakil Shaikh"
Дата:
Сообщение: Re: Using ANY()