On 21 November 2011 19:10, Joost Kraaijeveld <J.Kraaijeveld@xxxxxxxxxx> wrote: > 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". Does the data contain newlines? If not, you can just export it to a single file then use: split -l 1 exportedfile.txt -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general