Re: generic copy options

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Emmanuel Cecchet <manu(at)asterdata(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Emmanuel Cecchet <Emmanuel(dot)Cecchet(at)asterdata(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: generic copy options
Date: 2009-09-17 11:29:50
Message-ID: 4AB21DAE.5000808@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> psql has MORE need to support old syntax than the backend does, because
> it's supposed to work against old servers.
>
> I wonder though if we couldn't simplify matters. Offhand it seems to me
> that psql doesn't need to validate the command's syntax fully. All it
> really needs to do is find the target filename and replace it with
> STDIN/STDOUT. Could we have it just treat the remainder of the line
> literally, and not worry about the details of what the options might be?
> Let the backend worry about throwing an error if they're bad.
>
>
>

Makes plenty of sense.

On a related topic, I'm not sure how we would go about providing psql
support for the suggested copy-as-from-target feature that's been
discussed recently. That could get mildly ugly.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-09-17 11:32:59 Re: Streaming Replication patch for CommitFest 2009-09
Previous Message Emmanuel Cecchet 2009-09-17 11:29:42 Re: generic copy options