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

Re: ...copy hack

From: "Daniele Medri" <madrid(at)linux(dot)it>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ...copy hack
Date: 2000-03-31 11:46:57
Message-ID: 016e01bf9b06$d2371ec0$ (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> This is the first hack:
> 1) select data into temp-table from table where x.. y.. z..
> 2) copy temp-table into file.txt using delimiters ' '

I have to say once again that it is not COPYs task to provide the data to
you nor is it the server's task to format the output for you. For that we
have SELECT and client interfaces, respectively. If you insist on using
COPY you'll not get far.


from your aswer i post another question:
I have data on a pg db..  i want a text-file with this format for gnuplot...

1 2
1 3
1 5
3 5

for 2d plotting and..

1 2 3
3 4 6
3 6 8
3 5 7

for 3d plottting.

I know that with a view i can obtain a right data visualizzation...
I know that with copy i can put "data" from table to file...
I would use "copy" to put view data into a file... a raw copy.. but you've
your own opinion.. Ok.
How do you do to put data into my text file without outer language or bash
..i mean using only pg tools?


pgsql-hackers by date

Next:From: Magnus HaganderDate: 2000-03-31 12:43:08
Subject: RE: ...copy hack
Previous:From: Bruce MomjianDate: 2000-03-31 11:41:10
Subject: Function tables from my book

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