Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stuart Rison <rison(at)biochemistry(dot)ucl(dot)ac(dot)uk>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>, pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs.
Date: 1999-09-10 19:07:18
Message-ID: 10806.936990438@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Stuart Rison <rison(at)biochemistry(dot)ucl(dot)ac(dot)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Beth Strohmayer 1999-09-10 19:10:05 Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs.
Previous Message Keith G. Murphy 1999-09-10 16:02:40 Re: [GENERAL] two phase commit?

Browse pgsql-sql by date

  From Date Subject
Next Message Beth Strohmayer 1999-09-10 19:10:05 Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs.
Previous Message Kyle Bateman 1999-09-10 16:01:17 Re: [SQL] Type Conversion: int4 -> Money