On Thu, Dec 2, 2021 at 2:32 PM tanghy.f...@fujitsu.com <tanghy.f...@fujitsu.com> wrote: > > On Thursday, December 2, 2021 5:21 AM Peter Smith <smithpb2...@gmail.com> > wrote: > > > > PSA the v44* set of patches. > > > > Thanks for the new patch. Few comments: > > 1. This is an example in publication doc, but in fact it's not allowed. > Should we > change this example? > > +CREATE PUBLICATION active_departments FOR TABLE departments WHERE (active IS > TRUE); > > postgres=# CREATE PUBLICATION active_departments FOR TABLE departments WHERE > (active IS TRUE); > ERROR: invalid publication WHERE expression for relation "departments" > HINT: only simple expressions using columns, constants and immutable system > functions are allowed >
Thanks for finding this. Actually, the documentation looks correct to me. The problem was the validation walker of patch 0002 was being overly restrictive. It needed to also allow a BooleanTest node. Now it works (locally) for me. For example. test_pub=# create table departments(depno int primary key, active boolean); CREATE TABLE test_pub=# create publication pdept for table departments where (active is true) with (publish="insert"); CREATE PUBLICATION test_pub=# create publication pdept2 for table departments where (active is false) with (publish="insert"); CREATE PUBLICATION This fix will be available in v45*. ------ Kind Regards, Peter Smith. Fujitsu Australia.