Re: Question about STRICT - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Question about STRICT
Date
Msg-id [email protected]
Whole thread Raw
In response to Question about STRICT  (Gevik Babakhani <[email protected]>)
Responses Re: Question about STRICT
List pgsql-hackers
On Wed, Jun 3, 2009 at 9:45 AM, Gevik Babakhani <[email protected]> wrote:
> Could someone please clarify the difference between "RETURNS NULL ON NULL
> INPUT" or "STRICT" when creating a function.

They're synonyms.

> Do both options exist because
> of historical reasons/SQL standard compliance?

One or the other, not sure which.

> Shouldn't we raise an error when calling a function with NULL arguments
> values if the function is created as STRICT?

No, what they do is return NULL automatically. The function doesn't
have to check for NULL arguments itself.


-- 
greg


pgsql-hackers by date:

Previous
From: "Markus Wanner"
Date:
Subject: Re: Managing multiple branches in git
Next
From: Fujii Masao
Date:
Subject: Re: pg_standby -l might destory the archived file