View Issue Details

IDProjectCategoryView StatusLast Update
0000433Pgpool-IIBugpublic2018-10-19 13:54
ReporternagataAssigned Topengbo 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000433: IN (SELECT ...) can not be rewritten in native replication mode
DescriptionIn native replication, queries including now() etc. are rewritten to replace these with a timestamp constant value.
However, this doesn't support "IN (SELECT ...)" in WHERE clause.

For example,

test=# create table test (i int, t timestamp);
test=# update test set t = now() where i in (select 1);
ERROR: syntax error at or near "SELECT"

In the log message:

 LOG: pool_send_and_wait: Error or notice message from backend: : DB node id: 1 backend pid: 15075
 statement: "UPDATE "test" SET "t" = "pg_catalog"."timestamptz"('2018-10-11 21:04:17.087764+09'::text) WHERE "i"(SELECT 1)"
message: "syntax error at or near "SELECT""

TagsNo tags attached.



2018-10-18 18:26

developer   ~0002215

Thank you for reporting this bug.

It's fixed by the following commit.;a=commitdiff;h=d53292592a9808b260171f8569752ca89d7412fc


2018-10-19 13:53

developer   ~0002219

I also confirmed the problem is resolved in HEAD.

Issue History

Date Modified Username Field Change
2018-10-11 21:05 nagata New Issue
2018-10-12 09:27 pengbo Status new => assigned
2018-10-12 10:38 pengbo Assigned To => pengbo
2018-10-18 18:26 pengbo Note Added: 0002215
2018-10-19 13:53 nagata Note Added: 0002219
2018-10-19 13:54 nagata Status assigned => resolved
2018-10-19 13:54 nagata Resolution open => fixed