dbTalk Databases Forums  

Re: Query result to a file

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Re: Query result to a file in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ron St-Pierre
 
Posts: n/a

Default Re: Query result to a file - 08-10-2004 , 11:51 AM






Eduardo Vázquez Rodríguez wrote:

Quote:
Hi everybody out there using Postgres.

I am using PgAdminIII & I would like that my query results that
appears on the console might be redirected to a file or to a temporary
table.


Someone suggested in this list that I redirect the output of the query
using the "query" > file, but my intention is that the new file must
be on the client side.

My goal is to create a graphic from the query results and procesing
the data from the text file.


Any suggestions are welcome. :-)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Doesn't pgAdminIII have an option to output the results to the screen,
to a text file, to html, or to an excel spreadsheet? In pgAdminII it's a
dropdown box at the bottom of the SQL input window.

Ron


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #2  
Old   
Christian Poecher
 
Posts: n/a

Default Re: Query result to a file - 08-10-2004 , 04:33 PM






Eduardo Vázquez Rodríguez wrote:
Quote:
Someone suggested in this list that I redirect the output of the query
using the "query" > file, but my intention is that the new file must be
on the client side.
Actually Oliver used a client side approach. postmaster is the usual
server process and psql one possible client. psql -h HOSTNAME starts the
client process, if you are remote. You might have to compile psql for
your client system, though.

HTH, chris

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Reply With Quote
  #3  
Old   
Oliver Elphick
 
Posts: n/a

Default Re: Query result to a file - 08-11-2004 , 05:43 AM



On Tue, 2004-08-10 at 22:33, Christian Poecher wrote:
Quote:
Eduardo Vázquez Rodríguez wrote:
Someone suggested in this list that I redirect the output of the query
using the "query" > file, but my intention is that the new file must be
on the client side.

Actually Oliver used a client side approach. postmaster is the usual
server process and psql one possible client. psql -h HOSTNAME starts the
client process, if you are remote.
Yes. However I confused things by saying that the path specified by \o
needed to be writable by the backend. That is rubbish, of course, since
\o is executed by psql, not the backend.

--
Oliver Elphick olly (AT) lfix (DOT) co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"Be still before the LORD and wait patiently for him;
do not fret when men succeed in their ways, when they
carry out their wicked schemes."
Psalms 37:7


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.