Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group