aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-09-29 18:55:56 +0000
committerBruce Momjian <bruce@momjian.us>2003-09-29 18:55:56 +0000
commit2f98ece4de78961bbde606b03620c38e15490ddc (patch)
tree87ff7472686dfef7529181bc7ed3cee830b3052d /src/backend/tcop/postgres.c
parent6000e3280540701e56d347c60a0afc35e4fd96ae (diff)
downloadpostgresql-2f98ece4de78961bbde606b03620c38e15490ddc.tar.gz
postgresql-2f98ece4de78961bbde606b03620c38e15490ddc.zip
The brackets aren't put on the CHECK constraints properly.
Before patch: test=# select pg_get_constraintdef(oid) from pg_constraint; pg_get_constraintdef ------------------------------------------------------------------------------------------------- CHECK (VALUE >= 0) CHECK ((((a)::text = 'asdf'::text) OR ((a)::text = 'fdsa'::text)) OR ((a)::text = 'dfd'::text)) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) test=# select pg_get_constraintdef(oid, true) from pg_constraint; pg_get_constraintdef ----------------------------------------------------------------------------------- CHECK VALUE >= 0 CHECK a::text = 'asdf'::text OR a::text = 'fdsa'::text OR a::text = 'dfd'::text PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) After patch: test=# select pg_get_constraintdef(oid) from pg_constraint; pg_get_constraintdef ------------------------------------------------------------------------------------------------- CHECK (VALUE >= 0) CHECK ((((a)::text = 'asdf'::text) OR ((a)::text = 'fdsa'::text)) OR ((a)::text = 'dfd'::text)) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) test=# select pg_get_constraintdef(oid, true) from pg_constraint; pg_get_constraintdef ----------------------------------------------------------------------------------- CHECK (VALUE >= 0) ` CHECK (a::text = 'asdf'::text OR a::text = 'fdsa'::text OR a::text = 'dfd'::text) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) It's important that those brackets are there to (a) match all other constraints and (b) so that people can just copy and paste them and it will work as SQL. Christopher Kings-Lynne
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions