Re: Cannot declare record members NOT NULL - Mailing list pgsql-general

From Cultural Sublimation
Subject Re: Cannot declare record members NOT NULL
Date
Msg-id 71481.83145.qm@web63403.mail.re1.yahoo.com
Whole thread Raw
In response to Re: Cannot declare record members NOT NULL  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List 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 by date:

Previous
From: Cultural Sublimation
Date:
Subject: Re: Cannot declare record members NOT NULL
Next
From: Stefan Schwarzer
Date:
Subject: Re: Database/Table Design for Global Country Statistics