On Jun 20, 2013, at 14:33, guilherme <guilherme@xxxxxxxxxxxxxx> wrote: > I need to get some information in database and export it. > > Is there a way to make PostgreSQL to export one data line to a new file? > Like this: > 1 FIRST LINE --> line1.txt; > 2 SECOND LINE --> line2.txt; > 3 THIRD LINE --> line3.txt > ... > and so... > > I know that I can import all information into a unique file, but I need to > split that information into severel files. > I've already searched in everything and didn't find a solution. > > Can anybody help? That's a sufficiently unique requirement that there probably is no way to do that natively. Using a scripting language is probably your best bet. If you're already familiar with some, pick one of those. If not, I suggest Python (with the psycopg2 postgresql driver). There's even a version for Windows if that's what you're using. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general