BUG #5048: psql: \g doesn't redirect COPY TO STDOUT, but redirects next query - Mailing list pgsql-bugs

From Andrew Deryabin
Subject BUG #5048: psql: \g doesn't redirect COPY TO STDOUT, but redirects next query
Date
Msg-id 200909101404.n8AE4GhN053742@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5048: psql: \g doesn't redirect COPY TO STDOUT, but redirects next query  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5048
Logged by:          Andrew Deryabin
Email address:      andrew@deryabin.com
PostgreSQL version: 8.4
Operating system:   FreeBSD
Description:        psql: \g doesn't redirect COPY TO STDOUT, but redirects
next query
Details:

[pgsql@localhost:site]=# COPY (SELECT 1) TO STDOUT \g filename.ext
1
Time: 0.370 ms
[pgsql@localhost:site]=# SELECT 2;
Time: 0.290 ms
[pgsql@localhost:site]=# SELECT 3;
 ?column?
----------
        3
(1 row)

Time: 0.295 ms
^Z
$ cat filename.ext
 ?column?
----------
        2
(1 row)

pgsql-bugs by date:

Previous
From: "Rohan jamadagni"
Date:
Subject: BUG #5047: Not able to connect from Informatica
Next
From: Tom Lane
Date:
Subject: Re: BUG #5048: psql: \g doesn't redirect COPY TO STDOUT, but redirects next query