Re: A question about the psql \copy command

Lists: pgsql-hackers
From: "Etsuro Fujita" <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: "'pgsql-hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: A question about the psql \copy command
Date: 2013-02-07 12:45:17
Message-ID: 006401ce0530$fb4a1b30$f1de5190$@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Through the work on the patch [1], I had a question about the psql \copy
command. We are permitted 1) but not permitted 2):
1) \copy foo from stdin ;
2) \copy foo from stdin;
Is this intentional? I think it would be better to allow for 2). Attached is a
patch.

Thanks,

Best regards,
Etsuro Fujita

[1]
http://www.postgresql.org/message-id/002e01cdff64$a53663b0$efa32b10$@kapila@huaw
ei.com

Attachment Content-Type Size
psql_copy.patch application/octet-stream 376 bytes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A question about the psql \copy command
Date: 2013-02-10 20:34:49
Message-ID: CA+TgmobTXoCxC+-mE6XSPnTOCeo-AefS-yv2SvBjYxi6bFthOg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Feb 7, 2013 at 7:45 AM, Etsuro Fujita
<fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Through the work on the patch [1], I had a question about the psql \copy
> command. We are permitted 1) but not permitted 2):
> 1) \copy foo from stdin ;
> 2) \copy foo from stdin;
> Is this intentional? I think it would be better to allow for 2). Attached is a
> patch.

Sounds reasonable to me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Etsuro Fujita'" <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, "'pgsql-hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A question about the psql \copy command
Date: 2013-02-15 06:46:27
Message-ID: 008901ce0b48$2e742ec0$8b5c8c40$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thursday, February 07, 2013 6:15 PM Etsuro Fujita wrote:
> Through the work on the patch [1], I had a question about the psql
> \copy command. We are permitted 1) but not permitted 2):
> 1) \copy foo from stdin ;
> 2) \copy foo from stdin;
> Is this intentional? I think it would be better to allow for 2).
> Attached is a patch.

Verified that attached patch resolves the problem mentioned by you.
Ran the regression to ensure that it should not break any existing syntax.

Although this is minor bug, but IMO it will improve consistency among \
commands, because other works fine with ";"

With Regards,
Amit Kapila.


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: 'pgsql-hackers' <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A question about the psql \copy command
Date: 2013-09-10 23:36:37
Message-ID: 20130910233637.GI16378@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Feb 7, 2013 at 09:45:17PM +0900, Etsuro Fujita wrote:
> Through the work on the patch [1], I had a question about the psql \copy
> command. We are permitted 1) but not permitted 2):
> 1) \copy foo from stdin ;
> 2) \copy foo from stdin;
> Is this intentional? I think it would be better to allow for 2). Attached is a
> patch.

Modified, attached patch applied. Thanks.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
copy.diff text/x-diff 1.0 KB