Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs. - Mailing list pgsql-sql

From Tom Lane
Subject Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs.
Date
Msg-id 10806.936990438@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs.  (Stuart Rison <rison@biochemistry.ucl.ac.uk>)
List pgsql-sql
Stuart Rison <rison@biochemistry.ucl.ac.uk> writes:
> Now this would work except that there's a problem with pl/pgSQL such that
> when you pass several values to a plpgsql function and one of them is
> NULL, then all values passed to the function become NULL.

Yes.  That's not plpgsql's fault; there's a basic design limitation in
the function-call interface (only one isnull flag gets passed).  There
has been some talk on the pghackers list of fixing this, but I do not
know if it will happen any time soon or not.  Fixing that interface
would mean revising *all* the code that implements any SQL function or
operator, so it'd be pretty tedious --- and it'd break any C-coded
user functions, too.  It'll probably get done eventually, maybe even
for 6.6, but don't hold your breath...

            regards, tom lane

pgsql-sql by date:

Previous
From: Beth Strohmayer
Date:
Subject: Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs.
Next
From: Wayne Piekarski
Date:
Subject: Fast Backups With pg_dump