citusdata / citusdata/cstore_fdw
cstore_fdw does not honour check criteria when inserting new rows
- Dominant language
- C
- Stars
- 1.8k
- Forks
- 169
- PR merge metrics
- No merged PRs in 30d
Description
This issue come up with following thread.
https://groups.google.com/forum/#!topic/cstore-users/gDm56h9_QaA
Although, original issue report suggest check criteria is not added, it is in fact added to foreign table description, however insert command does not check those.
Short repro on PG 9.5.3 with cstore_1.5 active development release as of 1 Aug 2016.
``` sql
create foreign table cs_table(a int, check(a > 0)) server cstore_server;
insert into cs_table select -1;
INSERT 0 1
select * from cs_table;
a
----
-1
(1 row)
```
This code inserts a row with -1 violating check criteria.
If we perform the same test on a regular table we have following
``` sql
create table pg_table(a int, check(a > 0));
insert into pg_table select -1;
ERROR: new row for relation "pg_table" violates check constraint "pg_table_a_check"
DETAIL: Failing row contains (-1).
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.