pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15867: psql \copy from program does not work
3+ messages / 3 participants
[nested] [flat]

* BUG #15867: psql \copy from program does not work
@ 2019-06-22 00:39 PG Bug reporting form <noreply@postgresql.org>
  2019-06-22 02:46 ` Re: BUG #15867: psql \copy from program does not work Jeff Janes <jeff.janes@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2019-06-22 00:39 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: edwardjsabol@gmail.com

The following bug has been logged on the website:

Bug reference:      15867
Logged by:          Ed Sabol
Email address:      edwardjsabol@gmail.com
PostgreSQL version: 10.9
Operating system:   RHEL/CentOS 6.9
Description:        

The psql documentation at
https://www.postgresql.org/docs/current/app-psql.html says this should work,
but it does not.

Steps to reproduce:
1. Create a table named "sometable" in some convenient user database:

create table sometable (a1 varchar(100));

2. Execute psql and connect to that database.
3. Issue the following command:

\copy sometable from program '/bin/echo'

The following error message is returned:

program: No such file or directory

If you instead use the server-side COPY command, it works, of course:

copy sometable from program '/bin/echo';
select * from sometable;

Please fix psql \copy to work as documented. There are many use-cases for
running the program on the client-side (file permissions, the existence of
the program, etc.).



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15867: psql \copy from program does not work
  2019-06-22 00:39 BUG #15867: psql \copy from program does not work PG Bug reporting form <noreply@postgresql.org>
@ 2019-06-22 02:46 ` Jeff Janes <jeff.janes@gmail.com>
  2019-06-22 03:13   ` Re: BUG #15867: psql \copy from program does not work Edward J. Sabol <edwardjsabol@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Jeff Janes @ 2019-06-22 02:46 UTC (permalink / raw)
  To: edwardjsabol@gmail.com; pgsql-bugs@lists.postgresql.org

>
>
> \copy sometable from program '/bin/echo'
>
> The following error message is returned:
>
> program: No such file or directory
>

Works, for me, unless I use an ancient psql program (before 9.3).

When you started it, do you get an message like this:

WARNING: psql version 9.2, server version 9.6.
         Some psql features might not work.

This is one of those psql features that won't work.

Cheers,

Jeff

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15867: psql \copy from program does not work
  2019-06-22 00:39 BUG #15867: psql \copy from program does not work PG Bug reporting form <noreply@postgresql.org>
  2019-06-22 02:46 ` Re: BUG #15867: psql \copy from program does not work Jeff Janes <jeff.janes@gmail.com>
@ 2019-06-22 03:13   ` Edward J. Sabol <edwardjsabol@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Edward J. Sabol @ 2019-06-22 03:13 UTC (permalink / raw)
  To: Jeff Janes <jeff.janes@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

On Jun 21, 2019, at 10:46 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
>> \copy sometable from program '/bin/echo'
>> 
>> The following error message is returned:
>> 
>> program: No such file or directory
> 
> Works, for me, unless I use an ancient psql program (before 9.3).

I was about to swear I was using the psql from 10.9, but you’re right.... I somehow picked up a *very* ancient version of psql in my path, and my tests show it definitely works as documented when I fix my path and use psql 10.9. How embarrassing.... My sincerest apologies for the false bug report and for taking up any of your time. Thank you for the quick response!

Regards,
Ed

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-06-22 03:13 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-22 00:39 BUG #15867: psql \copy from program does not work PG Bug reporting form <noreply@postgresql.org>
2019-06-22 02:46 ` Jeff Janes <jeff.janes@gmail.com>
2019-06-22 03:13   ` Edward J. Sabol <edwardjsabol@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox