The following bug has been logged on the website:
Bug reference: 14296
Logged by: Ralf Wiebicke
Email address: ralf(at)rw7(dot)de
PostgreSQL version: 9.5.4
Operating system: Linux
Description:
I created two tables
CREATE Table tabgood ( col integer, CONSTRAINT checker CHECK ( col>0 ))
CREATE Table tabbad ( col integer, CONSTRAINT checker CHECK ( col>-1 ))
and fetch the check constraints from pg_constraint
SELECT ut.relname,uc.conname,uc.consrc
FROM pg_constraint uc INNER JOIN pg_class ut ON uc.conrelid=ut.oid
WHERE uc.contype='c'
the I get:
"tabgood";"checker";"(col > 0)"
"tabbad";"checker";"(col > '-1'::integer)"
The second clause is weird, although working. it should be just "col >
-1".
This problem is observed seen on PostgresSQL 9.5.4, it was not observed on
9.3.14.