COPY statement cannot take binding parameters

From: "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
To: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: COPY statement cannot take binding parameters
Date: 2008-09-02 08:07:52
Message-ID: 20080902080752.GA24220@cuci.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Trying to parse and bind the following:

COPY (SELECT $1::INT) TO STDOUT

gives a correct parsing-done, but then in the parameterdescription tells
me that there are no parameters.

Is this intended?
Is this a limitation of the COPY statement that will not change?
In that case, might I suggest the server generates an appropriate error
message when someone attempts to do this?
--
Sincerely,
Stephen R. van den Berg.
"Having a non-smoking section in a restaurant is like
having a non-peeing section in a pool."

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2008-09-02 08:13:16 Re: Window functions patch v04 for the September commit fest
Previous Message Pavel Stehule 2008-09-02 07:16:24 Re: Is this really really as designed or defined in some standard