Change error messages ExecAppend->ExecInsert and ExecReplace->ExecUpdate
as discussed on hackers.
This commit is contained in:
parent
c20ae1ce50
commit
29dfd5fa26
|
@ -27,7 +27,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.169 2002/06/26 22:16:54 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.170 2002/07/11 21:36:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -1223,7 +1223,7 @@ ExecInsert(TupleTableSlot *slot,
|
||||||
* Check the constraints of the tuple
|
* Check the constraints of the tuple
|
||||||
*/
|
*/
|
||||||
if (resultRelationDesc->rd_att->constr)
|
if (resultRelationDesc->rd_att->constr)
|
||||||
ExecConstraints("ExecAppend", resultRelInfo, slot, estate);
|
ExecConstraints("ExecInsert", resultRelInfo, slot, estate);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* insert the tuple
|
* insert the tuple
|
||||||
|
@ -1369,7 +1369,7 @@ ExecUpdate(TupleTableSlot *slot,
|
||||||
*/
|
*/
|
||||||
if (IsBootstrapProcessingMode())
|
if (IsBootstrapProcessingMode())
|
||||||
{
|
{
|
||||||
elog(WARNING, "ExecReplace: replace can't run without transactions");
|
elog(WARNING, "ExecUpdate: UPDATE can't run without transactions");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1420,7 +1420,7 @@ ExecUpdate(TupleTableSlot *slot,
|
||||||
*/
|
*/
|
||||||
lreplace:;
|
lreplace:;
|
||||||
if (resultRelationDesc->rd_att->constr)
|
if (resultRelationDesc->rd_att->constr)
|
||||||
ExecConstraints("ExecReplace", resultRelInfo, slot, estate);
|
ExecConstraints("ExecUpdate", resultRelInfo, slot, estate);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* replace the heap tuple
|
* replace the heap tuple
|
||||||
|
|
|
@ -411,7 +411,7 @@ create table atacc1 ( test int );
|
||||||
alter table atacc1 add constraint atacc_test1 check (test>3);
|
alter table atacc1 add constraint atacc_test1 check (test>3);
|
||||||
-- should fail
|
-- should fail
|
||||||
insert into atacc1 (test) values (2);
|
insert into atacc1 (test) values (2);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint atacc_test1
|
ERROR: ExecInsert: rejected due to CHECK constraint atacc_test1
|
||||||
-- should succeed
|
-- should succeed
|
||||||
insert into atacc1 (test) values (4);
|
insert into atacc1 (test) values (4);
|
||||||
drop table atacc1;
|
drop table atacc1;
|
||||||
|
@ -436,7 +436,7 @@ create table atacc1 ( test int, test2 int, test3 int);
|
||||||
alter table atacc1 add constraint atacc_test1 check (test+test2<test3*4);
|
alter table atacc1 add constraint atacc_test1 check (test+test2<test3*4);
|
||||||
-- should fail
|
-- should fail
|
||||||
insert into atacc1 (test,test2,test3) values (4,4,2);
|
insert into atacc1 (test,test2,test3) values (4,4,2);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint atacc_test1
|
ERROR: ExecInsert: rejected due to CHECK constraint atacc_test1
|
||||||
-- should succeed
|
-- should succeed
|
||||||
insert into atacc1 (test,test2,test3) values (4,4,5);
|
insert into atacc1 (test,test2,test3) values (4,4,5);
|
||||||
drop table atacc1;
|
drop table atacc1;
|
||||||
|
@ -445,7 +445,7 @@ create table atacc1 (test int check (test>3), test2 int);
|
||||||
alter table atacc1 add check (test2>test);
|
alter table atacc1 add check (test2>test);
|
||||||
-- should fail for $2
|
-- should fail for $2
|
||||||
insert into atacc1 (test2, test) values (3, 4);
|
insert into atacc1 (test2, test) values (3, 4);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint $2
|
ERROR: ExecInsert: rejected due to CHECK constraint $2
|
||||||
drop table atacc1;
|
drop table atacc1;
|
||||||
-- inheritance related tests
|
-- inheritance related tests
|
||||||
create table atacc1 (test int);
|
create table atacc1 (test int);
|
||||||
|
@ -454,11 +454,11 @@ create table atacc3 (test3 int) inherits (atacc1, atacc2);
|
||||||
alter table atacc2 add constraint foo check (test2>0);
|
alter table atacc2 add constraint foo check (test2>0);
|
||||||
-- fail and then succeed on atacc2
|
-- fail and then succeed on atacc2
|
||||||
insert into atacc2 (test2) values (-3);
|
insert into atacc2 (test2) values (-3);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint foo
|
ERROR: ExecInsert: rejected due to CHECK constraint foo
|
||||||
insert into atacc2 (test2) values (3);
|
insert into atacc2 (test2) values (3);
|
||||||
-- fail and then succeed on atacc3
|
-- fail and then succeed on atacc3
|
||||||
insert into atacc3 (test2) values (-3);
|
insert into atacc3 (test2) values (-3);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint foo
|
ERROR: ExecInsert: rejected due to CHECK constraint foo
|
||||||
insert into atacc3 (test2) values (3);
|
insert into atacc3 (test2) values (3);
|
||||||
drop table atacc3;
|
drop table atacc3;
|
||||||
drop table atacc2;
|
drop table atacc2;
|
||||||
|
@ -470,7 +470,7 @@ create table atacc3 (test3 int) inherits (atacc1, atacc2);
|
||||||
alter table only atacc2 add constraint foo check (test2>0);
|
alter table only atacc2 add constraint foo check (test2>0);
|
||||||
-- fail and then succeed on atacc2
|
-- fail and then succeed on atacc2
|
||||||
insert into atacc2 (test2) values (-3);
|
insert into atacc2 (test2) values (-3);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint foo
|
ERROR: ExecInsert: rejected due to CHECK constraint foo
|
||||||
insert into atacc2 (test2) values (3);
|
insert into atacc2 (test2) values (3);
|
||||||
-- both succeed on atacc3
|
-- both succeed on atacc3
|
||||||
insert into atacc3 (test2) values (-3);
|
insert into atacc3 (test2) values (-3);
|
||||||
|
@ -608,7 +608,7 @@ insert into atacc1 (test2, test) values (3, 3);
|
||||||
insert into atacc1 (test2, test) values (2, 3);
|
insert into atacc1 (test2, test) values (2, 3);
|
||||||
ERROR: Cannot insert a duplicate key into unique index atacc1_pkey
|
ERROR: Cannot insert a duplicate key into unique index atacc1_pkey
|
||||||
insert into atacc1 (test2, test) values (1, NULL);
|
insert into atacc1 (test2, test) values (1, NULL);
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute test
|
ERROR: ExecInsert: Fail to add null value in not null attribute test
|
||||||
drop table atacc1;
|
drop table atacc1;
|
||||||
-- alter table / alter column [set/drop] not null tests
|
-- alter table / alter column [set/drop] not null tests
|
||||||
-- try altering system catalogs, should fail
|
-- try altering system catalogs, should fail
|
||||||
|
@ -658,9 +658,9 @@ create table parent (a int);
|
||||||
create table child (b varchar(255)) inherits (parent);
|
create table child (b varchar(255)) inherits (parent);
|
||||||
alter table parent alter a set not null;
|
alter table parent alter a set not null;
|
||||||
insert into parent values (NULL);
|
insert into parent values (NULL);
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute a
|
ERROR: ExecInsert: Fail to add null value in not null attribute a
|
||||||
insert into child (a, b) values (NULL, 'foo');
|
insert into child (a, b) values (NULL, 'foo');
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute a
|
ERROR: ExecInsert: Fail to add null value in not null attribute a
|
||||||
alter table parent alter a drop not null;
|
alter table parent alter a drop not null;
|
||||||
insert into parent values (NULL);
|
insert into parent values (NULL);
|
||||||
insert into child (a, b) values (NULL, 'foo');
|
insert into child (a, b) values (NULL, 'foo');
|
||||||
|
@ -671,14 +671,14 @@ ERROR: ALTER TABLE: Attribute "a" contains NULL values
|
||||||
delete from parent;
|
delete from parent;
|
||||||
alter table only parent alter a set not null;
|
alter table only parent alter a set not null;
|
||||||
insert into parent values (NULL);
|
insert into parent values (NULL);
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute a
|
ERROR: ExecInsert: Fail to add null value in not null attribute a
|
||||||
alter table child alter a set not null;
|
alter table child alter a set not null;
|
||||||
insert into child (a, b) values (NULL, 'foo');
|
insert into child (a, b) values (NULL, 'foo');
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute a
|
ERROR: ExecInsert: Fail to add null value in not null attribute a
|
||||||
delete from child;
|
delete from child;
|
||||||
alter table child alter a set not null;
|
alter table child alter a set not null;
|
||||||
insert into child (a, b) values (NULL, 'foo');
|
insert into child (a, b) values (NULL, 'foo');
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute a
|
ERROR: ExecInsert: Fail to add null value in not null attribute a
|
||||||
drop table child;
|
drop table child;
|
||||||
drop table parent;
|
drop table parent;
|
||||||
-- test setting and removing default values
|
-- test setting and removing default values
|
||||||
|
|
|
@ -142,7 +142,7 @@ INSERT INTO serialTest VALUES ('foo');
|
||||||
INSERT INTO serialTest VALUES ('bar');
|
INSERT INTO serialTest VALUES ('bar');
|
||||||
INSERT INTO serialTest VALUES ('force', 100);
|
INSERT INTO serialTest VALUES ('force', 100);
|
||||||
INSERT INTO serialTest VALUES ('wrong', NULL);
|
INSERT INTO serialTest VALUES ('wrong', NULL);
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute f2
|
ERROR: ExecInsert: Fail to add null value in not null attribute f2
|
||||||
SELECT * FROM serialTest;
|
SELECT * FROM serialTest;
|
||||||
f1 | f2
|
f1 | f2
|
||||||
-------+-----
|
-------+-----
|
||||||
|
|
|
@ -97,14 +97,14 @@ create table nulltest
|
||||||
, col4 dnull
|
, col4 dnull
|
||||||
);
|
);
|
||||||
INSERT INTO nulltest DEFAULT VALUES;
|
INSERT INTO nulltest DEFAULT VALUES;
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute col3
|
ERROR: ExecInsert: Fail to add null value in not null attribute col3
|
||||||
INSERT INTO nulltest values ('a', 'b', 'c', 'd'); -- Good
|
INSERT INTO nulltest values ('a', 'b', 'c', 'd'); -- Good
|
||||||
INSERT INTO nulltest values (NULL, 'b', 'c', 'd');
|
INSERT INTO nulltest values (NULL, 'b', 'c', 'd');
|
||||||
ERROR: Domain dnotnull does not allow NULL values
|
ERROR: Domain dnotnull does not allow NULL values
|
||||||
INSERT INTO nulltest values ('a', NULL, 'c', 'd');
|
INSERT INTO nulltest values ('a', NULL, 'c', 'd');
|
||||||
ERROR: Domain dnotnull does not allow NULL values
|
ERROR: Domain dnotnull does not allow NULL values
|
||||||
INSERT INTO nulltest values ('a', 'b', NULL, 'd');
|
INSERT INTO nulltest values ('a', 'b', NULL, 'd');
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute col3
|
ERROR: ExecInsert: Fail to add null value in not null attribute col3
|
||||||
INSERT INTO nulltest values ('a', 'b', 'c', NULL); -- Good
|
INSERT INTO nulltest values ('a', 'b', 'c', NULL); -- Good
|
||||||
select * from nulltest;
|
select * from nulltest;
|
||||||
col1 | col2 | col3 | col4
|
col1 | col2 | col3 | col4
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
--
|
--
|
||||||
create table inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing');
|
create table inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing');
|
||||||
insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT);
|
insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT);
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute col2
|
ERROR: ExecInsert: Fail to add null value in not null attribute col2
|
||||||
insert into inserttest (col2, col3) values (3, DEFAULT);
|
insert into inserttest (col2, col3) values (3, DEFAULT);
|
||||||
insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT);
|
insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT);
|
||||||
insert into inserttest values (DEFAULT, 5, 'test');
|
insert into inserttest values (DEFAULT, 5, 'test');
|
||||||
|
|
|
@ -62,12 +62,12 @@ CREATE TABLE CHECK_TBL (x int,
|
||||||
INSERT INTO CHECK_TBL VALUES (5);
|
INSERT INTO CHECK_TBL VALUES (5);
|
||||||
INSERT INTO CHECK_TBL VALUES (4);
|
INSERT INTO CHECK_TBL VALUES (4);
|
||||||
INSERT INTO CHECK_TBL VALUES (3);
|
INSERT INTO CHECK_TBL VALUES (3);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint check_con
|
ERROR: ExecInsert: rejected due to CHECK constraint check_con
|
||||||
INSERT INTO CHECK_TBL VALUES (2);
|
INSERT INTO CHECK_TBL VALUES (2);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint check_con
|
ERROR: ExecInsert: rejected due to CHECK constraint check_con
|
||||||
INSERT INTO CHECK_TBL VALUES (6);
|
INSERT INTO CHECK_TBL VALUES (6);
|
||||||
INSERT INTO CHECK_TBL VALUES (1);
|
INSERT INTO CHECK_TBL VALUES (1);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint check_con
|
ERROR: ExecInsert: rejected due to CHECK constraint check_con
|
||||||
SELECT '' AS three, * FROM CHECK_TBL;
|
SELECT '' AS three, * FROM CHECK_TBL;
|
||||||
three | x
|
three | x
|
||||||
-------+---
|
-------+---
|
||||||
|
@ -82,13 +82,13 @@ CREATE TABLE CHECK2_TBL (x int, y text, z int,
|
||||||
CHECK (x > 3 and y <> 'check failed' and z < 8));
|
CHECK (x > 3 and y <> 'check failed' and z < 8));
|
||||||
INSERT INTO CHECK2_TBL VALUES (4, 'check ok', -2);
|
INSERT INTO CHECK2_TBL VALUES (4, 'check ok', -2);
|
||||||
INSERT INTO CHECK2_TBL VALUES (1, 'x check failed', -2);
|
INSERT INTO CHECK2_TBL VALUES (1, 'x check failed', -2);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint sequence_con
|
ERROR: ExecInsert: rejected due to CHECK constraint sequence_con
|
||||||
INSERT INTO CHECK2_TBL VALUES (5, 'z check failed', 10);
|
INSERT INTO CHECK2_TBL VALUES (5, 'z check failed', 10);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint sequence_con
|
ERROR: ExecInsert: rejected due to CHECK constraint sequence_con
|
||||||
INSERT INTO CHECK2_TBL VALUES (0, 'check failed', -2);
|
INSERT INTO CHECK2_TBL VALUES (0, 'check failed', -2);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint sequence_con
|
ERROR: ExecInsert: rejected due to CHECK constraint sequence_con
|
||||||
INSERT INTO CHECK2_TBL VALUES (6, 'check failed', 11);
|
INSERT INTO CHECK2_TBL VALUES (6, 'check failed', 11);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint sequence_con
|
ERROR: ExecInsert: rejected due to CHECK constraint sequence_con
|
||||||
INSERT INTO CHECK2_TBL VALUES (7, 'check ok', 7);
|
INSERT INTO CHECK2_TBL VALUES (7, 'check ok', 7);
|
||||||
SELECT '' AS two, * from CHECK2_TBL;
|
SELECT '' AS two, * from CHECK2_TBL;
|
||||||
two | x | y | z
|
two | x | y | z
|
||||||
|
@ -107,7 +107,7 @@ CREATE TABLE INSERT_TBL (x INT DEFAULT nextval('insert_seq'),
|
||||||
CONSTRAINT INSERT_CON CHECK (x >= 3 AND y <> 'check failed' AND x < 8),
|
CONSTRAINT INSERT_CON CHECK (x >= 3 AND y <> 'check failed' AND x < 8),
|
||||||
CHECK (x + z = 0));
|
CHECK (x + z = 0));
|
||||||
INSERT INTO INSERT_TBL(x,z) VALUES (2, -2);
|
INSERT INTO INSERT_TBL(x,z) VALUES (2, -2);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint insert_con
|
ERROR: ExecInsert: rejected due to CHECK constraint insert_con
|
||||||
SELECT '' AS zero, * FROM INSERT_TBL;
|
SELECT '' AS zero, * FROM INSERT_TBL;
|
||||||
zero | x | y | z
|
zero | x | y | z
|
||||||
------+---+---+---
|
------+---+---+---
|
||||||
|
@ -120,13 +120,13 @@ SELECT 'one' AS one, nextval('insert_seq');
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
INSERT INTO INSERT_TBL(y) VALUES ('Y');
|
INSERT INTO INSERT_TBL(y) VALUES ('Y');
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint insert_con
|
ERROR: ExecInsert: rejected due to CHECK constraint insert_con
|
||||||
INSERT INTO INSERT_TBL(y) VALUES ('Y');
|
INSERT INTO INSERT_TBL(y) VALUES ('Y');
|
||||||
INSERT INTO INSERT_TBL(x,z) VALUES (1, -2);
|
INSERT INTO INSERT_TBL(x,z) VALUES (1, -2);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint $2
|
ERROR: ExecInsert: rejected due to CHECK constraint $2
|
||||||
INSERT INTO INSERT_TBL(z,x) VALUES (-7, 7);
|
INSERT INTO INSERT_TBL(z,x) VALUES (-7, 7);
|
||||||
INSERT INTO INSERT_TBL VALUES (5, 'check failed', -5);
|
INSERT INTO INSERT_TBL VALUES (5, 'check failed', -5);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint insert_con
|
ERROR: ExecInsert: rejected due to CHECK constraint insert_con
|
||||||
INSERT INTO INSERT_TBL VALUES (7, '!check failed', -7);
|
INSERT INTO INSERT_TBL VALUES (7, '!check failed', -7);
|
||||||
INSERT INTO INSERT_TBL(y) VALUES ('-!NULL-');
|
INSERT INTO INSERT_TBL(y) VALUES ('-!NULL-');
|
||||||
SELECT '' AS four, * FROM INSERT_TBL;
|
SELECT '' AS four, * FROM INSERT_TBL;
|
||||||
|
@ -139,9 +139,9 @@ SELECT '' AS four, * FROM INSERT_TBL;
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
INSERT INTO INSERT_TBL(y,z) VALUES ('check failed', 4);
|
INSERT INTO INSERT_TBL(y,z) VALUES ('check failed', 4);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint $2
|
ERROR: ExecInsert: rejected due to CHECK constraint $2
|
||||||
INSERT INTO INSERT_TBL(x,y) VALUES (5, 'check failed');
|
INSERT INTO INSERT_TBL(x,y) VALUES (5, 'check failed');
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint insert_con
|
ERROR: ExecInsert: rejected due to CHECK constraint insert_con
|
||||||
INSERT INTO INSERT_TBL(x,y) VALUES (5, '!check failed');
|
INSERT INTO INSERT_TBL(x,y) VALUES (5, '!check failed');
|
||||||
INSERT INTO INSERT_TBL(y) VALUES ('-!NULL-');
|
INSERT INTO INSERT_TBL(y) VALUES ('-!NULL-');
|
||||||
SELECT '' AS six, * FROM INSERT_TBL;
|
SELECT '' AS six, * FROM INSERT_TBL;
|
||||||
|
@ -162,7 +162,7 @@ SELECT 'seven' AS one, nextval('insert_seq');
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
INSERT INTO INSERT_TBL(y) VALUES ('Y');
|
INSERT INTO INSERT_TBL(y) VALUES ('Y');
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint insert_con
|
ERROR: ExecInsert: rejected due to CHECK constraint insert_con
|
||||||
SELECT 'eight' AS one, currval('insert_seq');
|
SELECT 'eight' AS one, currval('insert_seq');
|
||||||
one | currval
|
one | currval
|
||||||
-------+---------
|
-------+---------
|
||||||
|
@ -193,11 +193,11 @@ CREATE TABLE INSERT_CHILD (cx INT default 42,
|
||||||
INHERITS (INSERT_TBL);
|
INHERITS (INSERT_TBL);
|
||||||
INSERT INTO INSERT_CHILD(x,z,cy) VALUES (7,-7,11);
|
INSERT INTO INSERT_CHILD(x,z,cy) VALUES (7,-7,11);
|
||||||
INSERT INTO INSERT_CHILD(x,z,cy) VALUES (7,-7,6);
|
INSERT INTO INSERT_CHILD(x,z,cy) VALUES (7,-7,6);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint insert_child_cy
|
ERROR: ExecInsert: rejected due to CHECK constraint insert_child_cy
|
||||||
INSERT INTO INSERT_CHILD(x,z,cy) VALUES (6,-7,7);
|
INSERT INTO INSERT_CHILD(x,z,cy) VALUES (6,-7,7);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint $1
|
ERROR: ExecInsert: rejected due to CHECK constraint $1
|
||||||
INSERT INTO INSERT_CHILD(x,y,z,cy) VALUES (6,'check failed',-6,7);
|
INSERT INTO INSERT_CHILD(x,y,z,cy) VALUES (6,'check failed',-6,7);
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint insert_con
|
ERROR: ExecInsert: rejected due to CHECK constraint insert_con
|
||||||
SELECT * FROM INSERT_CHILD;
|
SELECT * FROM INSERT_CHILD;
|
||||||
x | y | z | cx | cy
|
x | y | z | cx | cy
|
||||||
---+--------+----+----+----
|
---+--------+----+----+----
|
||||||
|
@ -227,7 +227,7 @@ SELECT '' AS three, * FROM INSERT_TBL;
|
||||||
INSERT INTO INSERT_TBL SELECT * FROM tmp WHERE yd = 'try again';
|
INSERT INTO INSERT_TBL SELECT * FROM tmp WHERE yd = 'try again';
|
||||||
INSERT INTO INSERT_TBL(y,z) SELECT yd, -7 FROM tmp WHERE yd = 'try again';
|
INSERT INTO INSERT_TBL(y,z) SELECT yd, -7 FROM tmp WHERE yd = 'try again';
|
||||||
INSERT INTO INSERT_TBL(y,z) SELECT yd, -8 FROM tmp WHERE yd = 'try again';
|
INSERT INTO INSERT_TBL(y,z) SELECT yd, -8 FROM tmp WHERE yd = 'try again';
|
||||||
ERROR: ExecAppend: rejected due to CHECK constraint insert_con
|
ERROR: ExecInsert: rejected due to CHECK constraint insert_con
|
||||||
SELECT '' AS four, * FROM INSERT_TBL;
|
SELECT '' AS four, * FROM INSERT_TBL;
|
||||||
four | x | y | z
|
four | x | y | z
|
||||||
------+---+---------------+----
|
------+---+---------------+----
|
||||||
|
@ -246,7 +246,7 @@ UPDATE INSERT_TBL SET x = NULL WHERE x = 5;
|
||||||
UPDATE INSERT_TBL SET x = 6 WHERE x = 6;
|
UPDATE INSERT_TBL SET x = 6 WHERE x = 6;
|
||||||
UPDATE INSERT_TBL SET x = -z, z = -x;
|
UPDATE INSERT_TBL SET x = -z, z = -x;
|
||||||
UPDATE INSERT_TBL SET x = z, z = x;
|
UPDATE INSERT_TBL SET x = z, z = x;
|
||||||
ERROR: ExecReplace: rejected due to CHECK constraint insert_con
|
ERROR: ExecUpdate: rejected due to CHECK constraint insert_con
|
||||||
SELECT * FROM INSERT_TBL;
|
SELECT * FROM INSERT_TBL;
|
||||||
x | y | z
|
x | y | z
|
||||||
---+---------------+----
|
---+---------------+----
|
||||||
|
@ -293,7 +293,7 @@ ERROR: Cannot insert a duplicate key into unique index primary_tbl_pkey
|
||||||
INSERT INTO PRIMARY_TBL VALUES (4, 'three');
|
INSERT INTO PRIMARY_TBL VALUES (4, 'three');
|
||||||
INSERT INTO PRIMARY_TBL VALUES (5, 'one');
|
INSERT INTO PRIMARY_TBL VALUES (5, 'one');
|
||||||
INSERT INTO PRIMARY_TBL (t) VALUES ('six');
|
INSERT INTO PRIMARY_TBL (t) VALUES ('six');
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute i
|
ERROR: ExecInsert: Fail to add null value in not null attribute i
|
||||||
SELECT '' AS four, * FROM PRIMARY_TBL;
|
SELECT '' AS four, * FROM PRIMARY_TBL;
|
||||||
four | i | t
|
four | i | t
|
||||||
------+---+-------
|
------+---+-------
|
||||||
|
@ -313,7 +313,7 @@ INSERT INTO PRIMARY_TBL VALUES (1, 'three');
|
||||||
INSERT INTO PRIMARY_TBL VALUES (4, 'three');
|
INSERT INTO PRIMARY_TBL VALUES (4, 'three');
|
||||||
INSERT INTO PRIMARY_TBL VALUES (5, 'one');
|
INSERT INTO PRIMARY_TBL VALUES (5, 'one');
|
||||||
INSERT INTO PRIMARY_TBL (t) VALUES ('six');
|
INSERT INTO PRIMARY_TBL (t) VALUES ('six');
|
||||||
ERROR: ExecAppend: Fail to add null value in not null attribute i
|
ERROR: ExecInsert: Fail to add null value in not null attribute i
|
||||||
SELECT '' AS three, * FROM PRIMARY_TBL;
|
SELECT '' AS three, * FROM PRIMARY_TBL;
|
||||||
three | i | t
|
three | i | t
|
||||||
-------+---+-------
|
-------+---+-------
|
||||||
|
|
Loading…
Reference in New Issue