Re: CSV hack - Mailing list pgsql-hackers

From Joe Conway
Subject Re: CSV hack
Date
Msg-id 3FD7C383.4030201@joeconway.com
Whole thread Raw
In response to CSV hack  (David Fetter <david@fetter.org>)
Responses Re: [Dbdpg-general] Re: CSV hack
List pgsql-hackers
David Fetter wrote:
> I've come up with yet another little hack, this time for turning 1-d 
> arrays into CSV format.

You mean like this (which is new in 7.4)?

regression=# select array_to_string (array[1,2,3], ','); array_to_string
----------------- 1,2,3
(1 row)

See:
http://www.postgresql.org/docs/current/static/functions-array.html

> It's very handy in conjunction with the array_accum aggregate (can
> this be made a standard aggregate?) in 
> <http://developer.postgresql.org/docs/postgres/xaggr.html>.

Early in the 7.4 dev cycle array_accum() was actually in cvs as a 
built-in C function (and it still does exist in PL/R as such). But 
toward the end of the cycle an objection was raised and it was removed. 
Search the archives in the May/June 2003 timeframe.

Joe



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: CSV hack
Next
From: David Fetter
Date:
Subject: Re: [Dbdpg-general] Re: CSV hack