Re: Arrays in PL/pgSQL routines?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ken Winter" <ken(at)sunward(dot)org>
Cc: "'Bricklen Anderson'" <banderson(at)presinet(dot)com>, "'PostgreSQL pg-sql list'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Arrays in PL/pgSQL routines?
Date: 2005-12-29 18:42:18
Message-ID: 22479.1135881738@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Ken Winter" <ken(at)sunward(dot)org> writes:
> That works. (Odd that the initialization seems to be necessary to make it
> work.) Thanks! Yes, I'm using version 7.4.

Possibly what you're running into is that 7.4 is restrictive about what
you can do with an array that's NULL. Until pretty recently, assigning
to an element of a NULL array left the array still NULL --- this is an
artifact of the fact that the system sees the assignment as a binary
operation with the array and the new element as inputs.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-12-29 18:46:39 Re: Arrays in PL/pgSQL routines?
Previous Message Ken Winter 2005-12-29 18:23:28 Re: Arrays in PL/pgSQL routines?