Skip site navigation (1) Skip section navigation (2)

Re: Queries to Export

From: "Chandra Sekhar Surapaneni" <chandu(at)positivenetworks(dot)net>
To: "Warren Murray" <murray_warren(at)bah(dot)com>,<pgsql-novice(at)postgresql(dot)org>
Subject: Re: Queries to Export
Date: 2006-02-16 22:54:01
Message-ID: 0F7F9A82BB0DBB4396A9F8386D0E0612ACCFB8@pos-exch1.corp.positivenetworks.net (view raw or flat)
Thread:
Lists: pgsql-novice
"\o filename";
"select your_query_goes_here;"
"\o"

This should do the trick. Basically \o will start writing the results to
the file. 
"\?" will give you help for such psql commands.

Regards
Chandra Sekhar Surapaneni

-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Warren Murray
Sent: Thursday, February 16, 2006 4:42 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] Queries to Export

I need to export the results of several union and join queries from a
PostgreSQL database tables into text files.  How is that done since the
results is not in a table?

Warren

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match



Responses

pgsql-novice by date

Next:From: operationsengineer1Date: 2006-02-17 01:04:47
Subject: Re: Version 8.1
Previous:From: Warren MurrayDate: 2006-02-16 22:41:58
Subject: Queries to Export

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group