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

Re: Export query result to text file?

From: denis(at)coralindia(dot)com
To: <pgsql-novice(at)postgresql(dot)org>,"Patrick Hatcher" <PHatcher(at)macys(dot)com>
Subject: Re: Export query result to text file?
Date: 2002-03-28 05:07:12
Message-ID: 005301c1d616$6d08c380$ (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
It works.... fine but creates a file "test.txt;" and not "test.txt"

If you do not give semicolon at the end, then it waits for it and if you
give it, it adds that in filename.



----- Original Message -----
From: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Sent: Thursday, March 28, 2002 4:10 AM
Subject: [NOVICE] Export query result to text file?

> Howdy,
> I'm trying to use a query to export some data.  My file is created, but no
> data is available.  If I run the query without exporting, it works fine.
> Select * from table1 limit 100 \o /home/phatcher/test.txt;
> must I always route the file first and then do my query?
> Thanks
> Patrick Hatcher
> Macys.Com
> Legacy Integration Developer
> 415-932-0610 office
> HatcherPT - AIM
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

In response to


pgsql-novice by date

Next:From: Lewis BergmanDate: 2002-03-29 18:17:57
Subject: INSERT for inherited tables
Previous:From: Dave DartnallDate: 2002-03-28 02:54:54
Subject: Formatted printing output

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