Re: Allow COPY to use parameters

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow COPY to use parameters
Date: 2016-05-24 22:13:53
Message-ID: 8737p7kt0g.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Merlin" == Merlin Moncure <mmoncure(at)gmail(dot)com> writes:

Merlin> Hm, what's the use case preparing COPY?

Preparing it isn't necessarily the point (and SQL-level PREPARE is not
addressed in that patch). The point is to allow parameters, so that a
client can do

COPY (select blah from whatever where thing = $1) TO ...

without having to mess around with interpolations.

Merlin> Note, the biggest pain point I have with COPY is not being able
Merlin> to parameterize the filename argument.

Certainly that can be handled too.

--
Andrew (irc:RhodiumToad)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2016-05-24 22:22:01 Re: effective_io_concurrency in 9.6beta
Previous Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2016-05-24 22:12:05 Re: To-Do item: skip table scan for adding column with provable check constraints