Re: generic copy options

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Emmanuel Cecchet <manu(at)asterdata(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 12:05:09
Message-ID: 162867790909170505t26e782b7q694354f282271f85@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/9/17 Emmanuel Cecchet <manu(at)asterdata(dot)com>:
> Tom Lane wrote:
>>>
>>> While I understand the need for the server to still support the syntax,
>>> is it necessary for newer version of psql to support the old syntax?
>>>
>>
>> psql has MORE need to support old syntax than the backend does, because
>> it's supposed to work against old servers.
>>
>
> Well, I wonder how many users just upgrade psql vs upgrade the server. I was
> thinking that when users perform a database upgrade their application often
> remain the same and therefore the server needs to support the old syntax.
> Unless you are upgrading a machine where a bunch of psql-based scripts are
> running to update various remote Postgres instances with older versions, I
> would guess that it is unlikely that someone is going to upgrade psql and
> keep the old instance of the server on the same machine.
> I just wonder how many users are using a single psql to manage multiple
> server instances of different older versions.

What application, that use current copy format for fast data import? I
thing, so doing incompatible changes of copy statement syntax is very
bad idea.

regards
Pavel Stehule

>>
>> 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.
>>
>
> As the only difference between \copy and copy seems to be the ability to
> stream the file from the client, I guess that everything else should be sent
> as is to the server as you suggest. I'll come with a patch for that today.
>
> Emmanuel
>
> --
> Emmanuel Cecchet
> Aster Data Systems
> Web: http://www.asterdata.com
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Emmanuel Cecchet 2009-09-17 13:00:33 Re: generic copy options
Previous Message Emmanuel Cecchet 2009-09-17 11:55:05 Re: generic copy options