Yes, that's correct behaviour. Any operation on null will yield null.
What you need to do:
select coalesce(field1,'') || coalesce(field2,'') ...
-alex
On Wed, 13 Jun 2001, Jean-Michel POURE wrote:
> Hello all,
>
> I have PostgreSQL 7.1.1 installed on a RedHat 7.1 server.
>
> When running the following query "SELECT Field1 || Field2 AS Result FROM Table"
> the result is NULL when Field2 is NULL.
>
> Same as if I use a PL/pgSQL function to concatenate Filed 1 || Field2.
>
> Did I miss something?
>
> Regards,
> Jean-Michel POURE, pgAdmin development team
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>