Re: Question about STRICT - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Question about STRICT
Date
Msg-id 4136ffa0906030236n665739c2m6a7220da2984b745@mail.gmail.com
Whole thread Raw
In response to Question about STRICT  (Gevik Babakhani <pgdev@xs4all.nl>)
Responses Re: Question about STRICT
List pgsql-hackers
On Wed, Jun 3, 2009 at 9:45 AM, Gevik Babakhani <pgdev@xs4all.nl> 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