Re: [GENERAL] array_accum() and quoted content

2008-07-29 Thread valgog
On Jul 29, 12:08 am, [EMAIL PROTECTED] (Alvaro Herrera) wrote: Raymond C. Rodgers escribió: The query in which I'm using array_accum() is building a   list of companies and the associated publishers for each. For example: SELECT c.company_id, c.company_name, array_accum(p.publisher_name)

[GENERAL] array_accum() and quoted content

2008-07-28 Thread Raymond C. Rodgers
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

Re: [GENERAL] array_accum() and quoted content

2008-07-28 Thread Tom Lane
Raymond C. Rodgers [EMAIL PROTECTED] writes: 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. That is per the definition of array output format:

Re: [GENERAL] array_accum() and quoted content

2008-07-28 Thread Raymond C. Rodgers
Tom Lane wrote: Raymond C. Rodgers [EMAIL PROTECTED] writes: 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. That is per the definition of array output format:

Re: [GENERAL] array_accum() and quoted content

2008-07-28 Thread Alvaro Herrera
Raymond C. Rodgers escribió: Drat, thanks. Other than array_accum() I've never used arrays in PostgreSQL, so I wasn't aware of that behavior. Why do you want to use array_accum() in the first place? Maybe there are better ways to do what you are using it for, that do not subject you to the

Re: [GENERAL] array_accum() and quoted content

2008-07-28 Thread Raymond C. Rodgers
Alvaro Herrera wrote: Raymond C. Rodgers escribió: Drat, thanks. Other than array_accum() I've never used arrays in PostgreSQL, so I wasn't aware of that behavior. Why do you want to use array_accum() in the first place? Maybe there are better ways to do what you are using it for,

Re: [GENERAL] array_accum() and quoted content

2008-07-28 Thread Alvaro Herrera
Raymond C. Rodgers escribió: The query in which I'm using array_accum() is building a list of companies and the associated publishers for each. For example: SELECT c.company_id, c.company_name, array_accum(p.publisher_name) AS publishers FROM company_table c LEFT JOIN

Re: [GENERAL] array_accum() and quoted content

2008-07-28 Thread Raymond C. Rodgers
Alvaro Herrera wrote: Raymond C. Rodgers escribió: The query in which I'm using array_accum() is building a list of companies and the associated publishers for each. For example: SELECT c.company_id, c.company_name, array_accum(p.publisher_name) AS publishers FROM company_table c LEFT

Re: [GENERAL] array_accum() and quoted content

2008-07-28 Thread David Fetter
On Mon, Jul 28, 2008 at 04:11:26PM -0400, Raymond C. Rodgers wrote: Alvaro Herrera wrote: Raymond C. Rodgers escribió: Drat, thanks. Other than array_accum() I've never used arrays in PostgreSQL, so I wasn't aware of that behavior. Why do you want to use array_accum() in the