Quick How To: Record SQL Results to Text File in PostgreSQL

December 2, 2009

Once you connected using psql,

# \o  /tmp/myrecord.txt

Then run any SQL queries you want.  They wont be visible on screen But will be recored to /tmp/myrecord.txt

#  SELECT * FROM my_super_dummy_table;

#\q

About these ads

2 Responses to “Quick How To: Record SQL Results to Text File in PostgreSQL”

  1. unmapeToume Says:

    Hey very nice blog!! Man .. Beautiful .. Amazing .. I will bookmark your blog and take the feeds also…


  2. […] schermo, ma sarà recored a / tmp / myrecord.txt # SELECT * FROM my_super_dummy_table; # q From: N Rao Lakkakula’s Blog. Continue reading. Categorie:Senza categoria Tag: Commenti (0) Trackbacks (0) Lascia un […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: