[pgpool-committers: 8967] pgpool: Fix time stamp rewrite bug.

Tatsuo Ishii ishii at sraoss.co.jp
Tue Dec 20 19:26:56 JST 2022


Fix time stamp rewrite bug.

In native replication/snapshot isolation mode, any write query
including timestamp/date/time data are rewritten so that all
PostgreSQL servers accept same timestamp etc. value. From 4.4 outfuncs
module which is used to generate rewritten query was broken for
boolean data. In a parse tree constant data is represented as
"A_Const". 4.4 updated the module by using PostgreSQL 15's outfuncs
module. Starting from PostgreSQL 15 A_Const handles more data type
including boolean. Unfortunately the pgpool's outfuncs module did not
adopt the change. As a result boolean constant was ignored and turned
into empty string in the rewritten query string, which caused syntax
errors.

This commit fixes the issue. Also modify _outA_Const() so that it uses
_out* functions to handle other data types to save a few lines of
code.

Per report from Michiel van Leening.
Discussion: at: https://www.pgpool.net/pipermail/pgpool-general/2022-December/008581.html
Back-patch to: 4.4.

Branch
------
V4_4_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f6cbfe25b14e9f5fde554c6fe2d42bf9adf60650

Modified Files
--------------
src/parser/outfuncs.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)



More information about the pgpool-committers mailing list