Re: Patch: Add parse_type Function

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: "David E(dot) Wheeler" <david(at)justatheory(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: Patch: Add parse_type Function
Date: 2024-02-05 14:49:29
Message-ID: dbed3b98-3d86-41e4-bded-b15016f122dc@uni-muenster.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 05.02.24 15:32, Dagfinn Ilmari Mannsåker wrote:
> Once the function is declared strict, I don't think either of these is
> necessary: function strictness is tested elsewhere, and it's the default
> behaviour. The only functions that explicitly say they return NULL on
> NULL inputs are quote_literal (because you might expect it to return the
> string 'NULL', but there's qoute_nullable for that) and xmlexists (which
> I don't see any particular reason for).
>
> - ilmari
>
>
+1
Yes, if the function was strict (which in the current design is not the
case) there is no need to check for nulls.

--
Jim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2024-02-05 14:59:27 Re: Grant read-only access to exactly one database amongst many
Previous Message Alvaro Herrera 2024-02-05 14:47:19 Re: cataloguing NOT NULL constraints