pgsql: Add DECLARE STATEMENT support to ECPG.

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add DECLARE STATEMENT support to ECPG.
Date: 2019-02-16 10:10:27
Message-ID: E1guwvT-0006Dm-JG@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add DECLARE STATEMENT support to ECPG.

DECLARE STATEMENT is a statement that lets users declare an identifier
pointing at a connection. This identifier will be used in other embedded
dynamic SQL statement such as PREPARE, EXECUTE, DECLARE CURSOR and so on.
When connecting to a non-default connection, the AT clause can be used in
a DECLARE STATEMENT once and is no longer needed in every dynamic SQL
statement. This makes ECPG applications easier and more efficient. Moreover,
writing code without designating connection explicitly improves portability.

Authors: Ideriha-san ("Ideriha, Takeshi" <ideriha(dot)takeshi(at)jp(dot)fujitsu(dot)com>)
Kuroda-san ("Kuroda, Hayato" <kuroda(dot)hayato(at)jp(dot)fujitsu(dot)com>)

Discussion: https://postgr.es/m4E72940DA2BF16479384A86D54D0988A565669DF(at)G01JPEXMBKW04

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bd7c95f0c1a38becffceb3ea7234d57167f6d4bf

Modified Files
--------------
doc/src/sgml/ecpg.sgml | 192 ++++++-
src/interfaces/ecpg/ecpglib/Makefile | 4 +-
src/interfaces/ecpg/ecpglib/connect.c | 6 +
src/interfaces/ecpg/ecpglib/cursor.c | 258 +++++++++
src/interfaces/ecpg/ecpglib/descriptor.c | 15 +-
src/interfaces/ecpg/ecpglib/ecpglib_extern.h | 21 +
src/interfaces/ecpg/ecpglib/error.c | 7 +
src/interfaces/ecpg/ecpglib/execute.c | 25 +-
src/interfaces/ecpg/ecpglib/exports.txt | 4 +
src/interfaces/ecpg/ecpglib/prepare.c | 242 ++++++++-
src/interfaces/ecpg/include/ecpgerrno.h | 1 +
src/interfaces/ecpg/include/ecpglib.h | 4 +
src/interfaces/ecpg/include/ecpgtype.h | 7 +
src/interfaces/ecpg/preproc/ecpg.addons | 77 ++-
src/interfaces/ecpg/preproc/ecpg.c | 86 ++-
src/interfaces/ecpg/preproc/ecpg.header | 1 +
src/interfaces/ecpg/preproc/ecpg.trailer | 34 ++
src/interfaces/ecpg/preproc/ecpg.type | 1 +
src/interfaces/ecpg/preproc/output.c | 157 +++++-
src/interfaces/ecpg/preproc/preproc_extern.h | 3 +
src/interfaces/ecpg/preproc/type.h | 8 +
src/interfaces/ecpg/test/ecpg_schedule | 1 +
.../ecpg/test/expected/compat_informix-sqlda.c | 12 +-
.../test/expected/compat_informix-test_informix.c | 4 +-
.../ecpg/test/expected/compat_oracle-char_array.c | 6 +-
.../ecpg/test/expected/pgtypeslib-nan_test.c | 18 +-
.../ecpg/test/expected/preproc-autoprep.c | 12 +-
src/interfaces/ecpg/test/expected/preproc-cursor.c | 76 +--
.../ecpg/test/expected/preproc-outofscope.c | 6 +-
.../ecpg/test/expected/preproc-variable.c | 6 +-
.../test/expected/preproc-whenever_do_continue.c | 6 +-
src/interfaces/ecpg/test/expected/sql-binary.c | 18 +-
src/interfaces/ecpg/test/expected/sql-declare.c | 595 +++++++++++++++++++++
.../ecpg/test/expected/sql-declare.stderr | 288 ++++++++++
.../ecpg/test/expected/sql-declare.stdout | 20 +
src/interfaces/ecpg/test/expected/sql-desc.c | 12 +-
src/interfaces/ecpg/test/expected/sql-dyntest.c | 6 +-
src/interfaces/ecpg/test/expected/sql-execute.c | 12 +-
src/interfaces/ecpg/test/expected/sql-fetch.c | 16 +-
src/interfaces/ecpg/test/expected/sql-oldexec.c | 12 +-
src/interfaces/ecpg/test/expected/sql-quote.c | 4 +-
src/interfaces/ecpg/test/expected/sql-sqlda.c | 12 +-
src/interfaces/ecpg/test/sql/.gitignore | 2 +
src/interfaces/ecpg/test/sql/Makefile | 3 +-
src/interfaces/ecpg/test/sql/declare.pgc | 207 +++++++
45 files changed, 2334 insertions(+), 173 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-02-16 10:14:21 Re: pgsql: Remove WITH OIDS support, change oid catalog column visibility.
Previous Message Tom Lane 2019-02-16 04:30:33 Re: pgsql: Fix compiler builtin usage in new pg_bitutils.c