pg 7.4.1
I should have listed the source for the function. Here is a simplified parseString function and the foo that calls it.
dennis=# create or replace function parseString (varchar, varchar) dennis-# RETURNS varchar[] AS ' dennis'# DECLARE dennis'# pParsed varchar[];
Make that last line: pParsed varchar[] := ''{}'';
That initializes pParsed to an *empty* array. Otherwise pParsed is NULL, and when you attempt to extend a NULL array, e.g. "pParsed[1] = ''blah''" you still get NULL. It is similar to this:
regression=# select NULL || 'blah'; ?column? ----------
(1 row)
HTH,
Joe
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html