Re: Array_append does not work with Array variables in PL/pgSQL? - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Array_append does not work with Array variables in PL/pgSQL?
Date
Msg-id 200404011348.26646.josh@agliodbs.com
Whole thread Raw
In response to Re: Array_append does not work with Array variables in PL/pgSQL?  (Joe Conway <mail@joeconway.com>)
Responses Re: Array_append does not work with Array variables in PL/pgSQL?
List pgsql-sql
Joe,

> You have to initialize the array to something non-null, even if that be 
> an empty array (note that there is a difference). When trying to append 
> an element to a NULL valued array, you wind up with a NULL result. It is 
> similar to:

Aha!

I knew that I was missing something fundamental.

BTW, did you get my e-mail to Hackers about ARRAY[] IS NULL?

-- 
-Josh BerkusAglio Database SolutionsSan Francisco



pgsql-sql by date:

Previous
From: Joe Conway
Date:
Subject: Re: Array_append does not work with Array variables in PL/pgSQL?
Next
From: Joe Conway
Date:
Subject: Re: Array_append does not work with Array variables in PL/pgSQL?