On 2009-10-20 15:54:30 +0800, Tim Bowden wrote:
> On Tue, 2009-10-20 at 18:07 +1100, Ron Savage wrote:
> > Hi Folks

[for those who don't know the sqlplus (or dbish) spool command: It's
similar to the Unix tee(1) command: It copies all output which would
normally go onto the screen into a file.

> > If it does, I can't see it in the Ref Man # 1.
> > 
> > Any ideas?
> > 
> 
> copy.  Note there is both an sql copy command and a psql copy command.

I don't think so:

Input/Output
  \copy ...              perform SQL COPY with data stream to the client host

And the postgresql copy command does something very different.

  \o [FILE]              send all query results to file or |pipe

is more like spool, but there are two important differences:

 1) it writes the results *only* to the file, not the screen.
 2) it affects only the results, not the commands.

You should be able to get around the first limitation by invoking 
\o |tee file
but I don't see any way around the second.

        hp

-- 
   _  | Peter J. Holzer    | Auf jedem Computer sollte der Satz Ludwigs II
|_|_) | Sysadmin WSR       | eingeprägt stehen: "Ein ewig Rätsel will ich
| |   | h...@wsr.ac.at      | bleiben, mir und andern."
__/   | http://www.hjp.at/ |    -- Wolfram Heinrich in desd

Attachment: signature.asc
Description: Digital signature

Reply via email to