Обсуждение: pgsql: Implement PREPARE AS statement for ECPG.

Поиск
Список
Период
Сортировка

pgsql: Implement PREPARE AS statement for ECPG.

От
Michael Meskes
Дата:
Implement PREPARE AS statement for ECPG.

Besides implementing the new statement this change fix some issues with the
parsing of PREPARE and EXECUTE statements. The different forms of these
statements are now all handled in a ujnified way.

Author: Matsumura-san <matsumura.ryo@jp.fujitsu.com>

Branch
------
master

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

Modified Files
--------------
src/interfaces/ecpg/ecpglib/ecpglib_extern.h       |   1 +
src/interfaces/ecpg/ecpglib/execute.c              |  82 ++-
src/interfaces/ecpg/ecpglib/prepare.c              |  54 ++
src/interfaces/ecpg/include/ecpgtype.h             |   4 +-
src/interfaces/ecpg/preproc/check_rules.pl         |   7 +-
src/interfaces/ecpg/preproc/ecpg.addons            |  66 +-
src/interfaces/ecpg/preproc/ecpg.header            |   1 +
src/interfaces/ecpg/preproc/output.c               |  24 +-
src/interfaces/ecpg/preproc/parse.pl               |   9 +-
src/interfaces/ecpg/preproc/type.h                 |   6 +
src/interfaces/ecpg/test/ecpg_schedule             |   1 +
src/interfaces/ecpg/test/expected/sql-prepareas.c  | 664 +++++++++++++++++++++
.../ecpg/test/expected/sql-prepareas.stderr        |   0
.../ecpg/test/expected/sql-prepareas.stdout        |  66 ++
src/interfaces/ecpg/test/sql/Makefile              |   3 +-
src/interfaces/ecpg/test/sql/prepareas.pgc         | 198 ++++++
16 files changed, 1163 insertions(+), 23 deletions(-)


Re: pgsql: Implement PREPARE AS statement for ECPG.

От
Michael Paquier
Дата:
On Wed, May 22, 2019 at 03:08:37AM +0000, Michael Meskes wrote:
> Implement PREPARE AS statement for ECPG.
>
> Besides implementing the new statement this change fix some issues with the
> parsing of PREPARE and EXECUTE statements. The different forms of these
> statements are now all handled in a ujnified way.
>
> Author: Matsumura-san <matsumura.ryo@jp.fujitsu.com>

This is a new feature and not a bug fix, hence why has this been
committed to HEAD knowing that the feature freeze of v12 is effective
as of the 8th of April?  You should have waited until REL_12_STABLE
has been created for new features.

(The indentation of the new code in ecpglib/prepare.c is broken.)
--
Michael

Вложения

Re: pgsql: Implement PREPARE AS statement for ECPG.

От
Michael Meskes
Дата:
> This is a new feature and not a bug fix, hence why has this been
> committed to HEAD knowing that the feature freeze of v12 is effective
> as of the 8th of April?  You should have waited until REL_12_STABLE
> has been created for new features.

Please see the thread on hackers. Yes, it is a new feature but that
part is small, the bigger impact is that this patch fixing a
prepare/execute implementation that was completely broken. By adding
new features here and there we managed to create an implementation that
did work well in some areas but surprisingly (unless you know the
source code) failed with minor change to the underlying statement.

That's why I committed it despite being late in the cycle. And because
it only has an impact on an interface not the backend itself.

Of course, if the consensus is to revert the patch until v13 I will
accept that.

> (The indentation of the new code in ecpglib/prepare.c is broken.)

What's wrong? I fixed the original one to stop my gcc from complaining,
but maybe I missed a piece.

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

Вложения