Re: [HACKERS] NULL in arrays

2006-11-08 Thread Robert Treat
On Monday 06 November 2006 20:16, Jim C. Nasby wrote: > On Sun, Nov 05, 2006 at 09:53:08PM +0100, Martijn van Oosterhout wrote: > > Note that the constructs: > > > > ARRAY['a',"NULL",'c'] > > > > and > > > > '{a,"NULL",c}' > > > > are *completely* different. The first is a special array constructor

Re: [HACKERS] NULL in arrays

2006-11-06 Thread Jim C. Nasby
On Sun, Nov 05, 2006 at 09:53:08PM +0100, Martijn van Oosterhout wrote: > Note that the constructs: > > ARRAY['a',"NULL",'c'] > > and > > '{a,"NULL",c}' > > are *completely* different. The first is a special array constructor > and all its parameters are normal SQL expressions, so you can refer

Re: [HACKERS] NULL in arrays

2006-11-05 Thread Guillaume Lelarge
Martijn van Oosterhout a écrit : > On Sun, Nov 05, 2006 at 08:23:59PM +0100, Guillaume Lelarge wrote: >> Setting a NULL value seems to work. >> >> amarok=# SELECT ARRAY['a',"NULL",'c']; >> ERROR: column "NULL" does not exist >> LINE 1: SELECT ARRAY['a',"NULL",'c']; >> ^ >>

Re: [HACKERS] NULL in arrays

2006-11-05 Thread Martijn van Oosterhout
On Sun, Nov 05, 2006 at 08:23:59PM +0100, Guillaume Lelarge wrote: > Setting a NULL value seems to work. > > amarok=# SELECT ARRAY['a',"NULL",'c']; > ERROR: column "NULL" does not exist > LINE 1: SELECT ARRAY['a',"NULL",'c']; > ^ > > Using double quotes throws an error.

Re: [HACKERS] NULL in arrays

2006-11-05 Thread Andrew Dunstan
Guillaume Lelarge wrote: Hi all, I tried to work with NULL items in an array but there are two things I don't understand. (I just did a cvs update, make, make install... so sources are current.) On http://momjian.us/main/writings/pgsql/sgml/arrays.html, you can read : To set an element of a

[HACKERS] NULL in arrays

2006-11-05 Thread Guillaume Lelarge
Hi all, I tried to work with NULL items in an array but there are two things I don't understand. (I just did a cvs update, make, make install... so sources are current.) On http://momjian.us/main/writings/pgsql/sgml/arrays.html, you can read : To set an element of an array constant to NULL, wri