Exporting 1 text column from all rows from a table to a file per row?

From: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Exporting 1 text column from all rows from a table to a file per row?
Date: 2011-11-21 19:10:42
Message-ID: 1321902642.2201.41.camel@panoramix.Askesis.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Is it possible, and if so how, to export a single column of a table into
a separate file per row? I have a table with ~21000 rows that have a
column "body1" containing ASCII text and I want to have 21000 separate
ASCII files, each containing that column "body1". The name of the file
does not matter, although it would be nice if they had the extension
"txt".

TIA

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2011-11-21 19:20:53 Re: Exporting 1 text column from all rows from a table to a file per row?
Previous Message Gavin Flower 2011-11-21 19:05:01 Re: How to write a own parser for full text search