Re: Cannot declare record members NOT NULL

Поиск
Список
Период
Сортировка
От Cultural Sublimation
Тема Re: Cannot declare record members NOT NULL
Дата
Msg-id 71481.83145.qm@web63403.mail.re1.yahoo.com
обсуждение исходный текст
Ответ на Re: Cannot declare record members NOT NULL  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-general
Hi,

> The thing behind the RETURNS in a function is always a data type,
> regardless if it is one that has been explicitly declared with
> CREATE TYPE or implicitly by CREATE TABLE.
>
> There are no NOT NULL conditions for data types.
>
> NOT NULL only exists for table columns.

Thanks for the informative reply.  As I mentioned in the message
to Tom, I think I understand the source of the problem.  In SQL,
type constraints are not seen as creating different types, whereas
in OCaml they do.  (I still maintain that OCaml's way of doing
things is more correct on a fundamental level, though).

> Have you considered an ON SELECT ... DO INSTEAD rule?
> http://www.postgresql.org/docs/current/static/rules.html
>
> You could create a table that represents the query and
> define a SELECT rule on it.

Thanks, I'll investigate that...

Regards,
C.S.




____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow

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

Предыдущее
От: Cultural Sublimation
Дата:
Сообщение: Re: Cannot declare record members NOT NULL
Следующее
От: Stefan Schwarzer
Дата:
Сообщение: Re: Database/Table Design for Global Country Statistics