From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | jim_gray(at)cox(dot)net, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #16304: ECPG won't accept input from STDIN |
Date: | 2020-03-23 02:45:09 |
Message-ID: | 20200323024509.GD2031@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Mar 16, 2020 at 08:48:22PM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 16304
> Logged by: James Gray
> Email address: jim_gray(at)cox(dot)net
> PostgreSQL version: 11.5
> Operating system: AIX
> Description:
>
> On an older version (9.6.3) of Postgres on CentOS 7.7.1908, ECPG accepts
> input from STDIN:
>
> [singha7] (jgray) ~> psql --version
> psql (PostgreSQL) 9.6.3
> [singha7] (jgray) ~>
>
> [singha7] (jgray) ~> ecpg -o - -
> /* Processed by ecpg (4.12.0) */
> /* These include files are added by the preprocessor */
> #include <ecpglib.h>
> #include <ecpgerrno.h>
> #include <sqlca.h>
> /* End of automatic include section */
>
> #line 1 "stdin"
> ^C
> [singha7] (jgray) ~>
>
> On a newer version (11.5) of Postgres on AIX 7.2, ECPG does NOT accept input
> from STDIN:
>
> bash-5.0$ psql --version
> psql (PostgreSQL) 11.5
> bash-5.0$
>
> bash-5.0$ ecpg -o - -
> Try "ecpg --help" for more information.
> bash-5.0$
>
> I suspect a problem in the Postgres version of getopt_long.c
Yeah, you might be right. In some cases we use the libc (maybe GNU)
getopt-long, and in other cases we use our own version, and there are
behavioral differences between the two. The fact you are testing on
CentOS and the other on AIX probably explains it. I think using
/dev/stdin should work on both.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-03-23 04:20:51 | Re: BUG #16304: ECPG won't accept input from STDIN |
Previous Message | Julien Rouhaud | 2020-03-22 09:21:42 | Re: BUG #16310: Database Cluster Initialization failed while installing postgres |