"COPY foo FROM STDOUT" and ecpg

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: "COPY foo FROM STDOUT" and ecpg
Date: 2013-02-26 15:13:38
Message-ID: 512CD122.4050007@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While looking at Fujita Etsuro's patch to allow copy to/from a shell
command, I noticed that the grammar currently allows these:

COPY foo FROM STDOUT
COPY foo TO STDIN

In other words, STDIN and STDOUT can be used completely interchangeably.
However, the ecpg grammar is more strict about that:

ERROR: COPY TO STDIN is not possible

Any particular reason for ecpg to check that, while the backend doesn't
care? I think we should just remove those checks from the ecpg grammar.

- Heikki

Attachment Content-Type Size
remove-copy-from-stdout-check.patch text/x-diff 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2013-02-26 15:34:54 pg_xlogdump compile error
Previous Message Andres Freund 2013-02-26 13:00:26 Re: PGXS contrib builds broken?