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

Tatsuo Ishii ishii at sraoss.co.jp
Tue Dec 20 19:27:14 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

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

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



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

More information about the pgpool-committers mailing list