From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Yeb Havinga <yebhavinga(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Orafce concat operator |
Date: | 2010-02-10 14:31:07 |
Message-ID: | 162867791002100631u929b8bavb1b2706540a97cfe@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2010/2/10 Yeb Havinga <yebhavinga(at)gmail(dot)com>:
> Hello list,
>
> The Orafce compatibility package doesn't seem to have operators defined
> (looked in the sql load file). The function I'm specifically interested in,
> is Oracle's concatenation that regards a NULL as the empty string and hence
> returns 'the other value'. This in contrast with Pg's || that returns NULL
> if either of the operands is NULL. The Orafce package contains a concat
> function with Oracle behaviour, however an operator is missing.
>
> Having an associative operator has benefits over having only a function,
> since that would make translating expressions like 'monkey' || 'nut' || NULL
> easy.
>
> What about adding something like operator ||| in the orafce package for
> concat?
no, it could be confusing and it isn't enough, because it isn't only
|| or concat problem. On Oracle empty string is equal to NULL and NULL
is equal to empty string.
example: '' is null, length('')
http://www.thunderguy.com/semicolon/2003/04/26/oracle-empty-string-null/
so we are not able emulate this behave.
Regards
Pavel Stehule
>
> Regards,
> Yeb Havinga
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Asher | 2010-02-10 14:32:48 | Re: Best way to handle multi-billion row read-only table? |
Previous Message | Torsten Zühlsdorff | 2010-02-10 14:15:18 | Re: PHP and PostgreSQL boolean data type |