array_accum() and quoted content

From: "Raymond C(dot) Rodgers" <sinful622(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: array_accum() and quoted content
Date: 2008-07-28 18:47:23
Message-ID: 488E143B.6050500@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Some time ago, I found the aggregate function array_accum() listed on
the PostgreSQL web site on a page similar to
http://www.postgresql.org/docs/8.2/static/xaggr.html , and implemented
it in a database that hasn't seen much use. More recently, for a client,
I again used the function but I'm running into some inconsistencies
within a select query in which I'm using the aggregate. The problem is
that sometimes the data contained in the array is quoted, and other
times it isn't, all within the same query results. My returned data may
appear like this:

accumed_column
============
{"test 1","test 2","test 3"}
{test4,test5,test6}

The only difference I can see is that the quotes don't appear when the
values returned don't contain white space, and do when white space is
present. Is there any way to force consistency? My PHP code currently is
expecting quoted strings to be returned.

Thank you,
Raymond

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-07-28 19:11:04 Re: array_accum() and quoted content
Previous Message Andrew Sullivan 2008-07-28 18:17:41 Re: Re: should i need to install xml library in postgresql inorder to work on xml file?