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

From: Stuart Rison <rison(at)biochemistry(dot)ucl(dot)ac(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Getting multiple field unique index to distinguish NULLs.
Date: 1999-09-14 11:02:23
Message-ID: Pine.LNX.4.10.9909141156140.7111-100000@bsmlx17
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On Fri, 10 Sep 1999, Tom Lane wrote:

> 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
>

Aha! Thanks a lot for that Tom, I've been wondering for ages if this NULL
behaviour was just a version things (I've got 6.4.2) or a more profound
'problem'.

Hum... how unfortunate that it's the latter. Personally, and this is
completely sellfish -I use functions quite a lot- I'd love to see this
fixed asap! Alas, can't do it myself, I barely managed to get 'hello
world' to work in C (he weeps)...

Whilst I'm on a whimsical trip, my other top wishes remain:

1) outer joins (not 'workarounds')
2) referential integrity (not refint.c)

Still PG is top-tastic all the same. Thanks to all Hackers out there!

Cheers,

S.

Stuart C. G. Rison
Department of Biochemistry and Molecular Biology
Gower Street, London, WC1E 6BT, United Kingdom
Tel. 0207 504 2303, Fax. 0207 380 7193
e-mail: s(dot)rison(at)biochem(dot)ucl(dot)ac(dot)uk

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Rison 1999-09-14 11:06:01 RE: [GENERAL] Getting multiple field unique index to distinguish NULLs.
Previous Message grzegorz.przezdziecki 1999-09-14 10:07:02 About users

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 1999-09-14 15:02:13 Re: [SQL] Array Madness
Previous Message Jens Glaser 1999-09-14 08:00:57 reliable way to crash postgres :)