Add test case for Issue #74
authorPallavi Sontakke <[email protected]>
Wed, 27 Jul 2016 09:51:39 +0000 (15:21 +0530)
committerPavan Deolasee <[email protected]>
Tue, 18 Oct 2016 10:07:24 +0000 (15:37 +0530)
SQL error codes are not correctly sent back to
the client when dealing with error on COPY protocol

src/test/regress/expected/xl_reported_bugs.out
src/test/regress/sql/xl_reported_bugs.sql

index 33b8daecbcd69ff5e7a55269fb2c3fbb2750e1d6..7218b26c73e755b48cd60346e89dc7ab5a9aa88b 100644 (file)
@@ -1,3 +1,14 @@
+-- #74
+-- SQL error codes are not correctly sent back to the client when dealing with error on COPY protocol
+\set VERBOSITY verbose
+create table copytbl(a integer, b text default 'a_copytbl', primary key (a));
+insert into copytbl select generate_series(1,200);
+COPY copytbl (a, b) from stdin;
+ERROR:  23505: duplicate key value violates unique constraint "copytbl_pkey"
+DETAIL:  Key (a)=(1) already exists.
+LOCATION:  pgxc_node_report_error, execRemote.c:6284
+drop table copytbl;
+\set VERBOSITY default
 -- #13
 -- INSERT query with SELECT part using joins on OID fails to insert all rows correctly
 create table tmp_films(a int, b text default 'a_tmp_film') with oids;
index ccc751e7d4e083aa91934fa06b2d0fc1dda834ca..a8c84657ebcfcd068c04809ba518708e4f9014e4 100644 (file)
@@ -1,3 +1,17 @@
+-- #74
+-- SQL error codes are not correctly sent back to the client when dealing with error on COPY protocol
+\set VERBOSITY verbose
+create table copytbl(a integer, b text default 'a_copytbl', primary key (a));
+insert into copytbl select generate_series(1,200);
+COPY copytbl (a, b) from stdin;
+10000  789
+10001  789
+1      789
+10002  789
+10003  789
+\.
+drop table copytbl;
+\set VERBOSITY default
 -- #13
 -- INSERT query with SELECT part using joins on OID fails to insert all rows correctly
 create table tmp_films(a int, b text default 'a_tmp_film') with oids;