-
Bug
-
Resolution: Done
-
Major
-
3.1.1.Final
-
None
-
False
-
-
False
As part of https://issues.redhat.com/browse/DBZ-8277, the Postgres reselect behavior was changed to explicitly cast the value to the column type (here).
This has a side effect of breaking the reselector for any tables that use a serial primary key, because it produces queries such as:
SELECT "toast_column" FROM "public"."my_table" WHERE id=1::serial
And as serial is a notational convenience and not a true type, it raises an error:
org.postgresql.util.PSQLException: ERROR: type "serial" does not exist
PostgresReselectColumnsProcessorIT creates tables with integer primary keys such as:
CREATE TABLE s1.dbz4321_toast (id int primary key, data text, data2 int);
which allows tests to pass, but if you change the syntax to use serial instead, the test fails.
serial, smallserial, and bigserial should be cast to their corresponding types of int4, int2, and int8.