Re: pgsql: Add Oracle like handling of char arrays.

2018-03-14 Thread Michael Meskes
> Please check these compiler warnings:
> ...

Fixed, thanks.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL



Re: pgsql: Add Oracle like handling of char arrays.

2018-03-14 Thread Peter Eisentraut
On 3/13/18 20:38, Michael Meskes wrote:
> Add Oracle like handling of char arrays.
> 
> In some cases Oracle Pro*C handles char array differently than ECPG. This 
> patch
> adds a Oracle compatibility mode to make ECPG behave like Pro*C.

Please check these compiler warnings:

char_array.pgc: In function 'main':
char_array.pgc:21:3: error: ISO C90 forbids mixed declarations and code
[-Werror=declaration-after-statement]
   const char *p = "X";
   ^
char_array.pgc: At top level:
char_array.pgc:63:13: error: 'warn' was used with no prototype before
its definition [-Werror=missing-prototypes]
 static void warn(void)
 ^~~~

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql: Add Oracle like handling of char arrays.

2018-03-13 Thread Michael Meskes
Add Oracle like handling of char arrays.

In some cases Oracle Pro*C handles char array differently than ECPG. This patch
adds a Oracle compatibility mode to make ECPG behave like Pro*C.

Patch by David Rader 

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/3b7ab4380440d7b14ee390fabf39f6d87d7491e2

Modified Files
--
src/interfaces/ecpg/ecpglib/data.c |  49 -
src/interfaces/ecpg/ecpglib/extern.h   |   3 +-
src/interfaces/ecpg/preproc/ecpg.c |   6 +-
src/interfaces/ecpg/preproc/extern.h   |   4 +-
src/interfaces/ecpg/test/Makefile  |   2 +
src/interfaces/ecpg/test/compat_oracle/.gitignore  |   2 +
src/interfaces/ecpg/test/compat_oracle/Makefile|  11 ++
.../ecpg/test/compat_oracle/char_array.pgc |  66 +++
src/interfaces/ecpg/test/ecpg_schedule |   1 +
.../ecpg/test/expected/compat_oracle-char_array.c  | 219 +
.../test/expected/compat_oracle-char_array.stderr  | 145 ++
.../test/expected/compat_oracle-char_array.stdout  |  10 +
12 files changed, 513 insertions(+), 5 deletions(-)