Add test case for Issue #13
authorPallavi Sontakke <[email protected]>
Tue, 26 Jul 2016 10:01:24 +0000 (15:31 +0530)
committerPallavi Sontakke <[email protected]>
Tue, 26 Jul 2016 10:01:24 +0000 (15:31 +0530)
INSERT query with SELECT part using joins on OID fails to insert all rows correctly

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

index 77a1b3f08a5c064dc7e482aa80ca3fe1c4697e76..33b8daecbcd69ff5e7a55269fb2c3fbb2750e1d6 100644 (file)
@@ -1,3 +1,21 @@
+-- #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;
+create table films(a int, b text default 'a_film') with oids;
+insert into tmp_films select generate_series(1, 10000);-- 10K entries
+select count(*) from tmp_films;
+ count 
+-------
+ 10000
+(1 row)
+
+insert into films select * from tmp_films where oid >= (select oid from tmp_films order by oid limit 1);
+select count(*) from films;
+ count 
+-------
+ 10000
+(1 row)
+
 -- #9
 -- Fails to see DDL's effect inside a function
 create function xl_getint() returns integer as $$
index 1e7181019d6e4426df2ce5f770705e5672d810f6..ccc751e7d4e083aa91934fa06b2d0fc1dda834ca 100644 (file)
@@ -1,3 +1,11 @@
+-- #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;
+create table films(a int, b text default 'a_film') with oids;
+insert into tmp_films select generate_series(1, 10000);-- 10K entries
+select count(*) from tmp_films;
+insert into films select * from tmp_films where oid >= (select oid from tmp_films order by oid limit 1);
+select count(*) from films;
 -- #9
 -- Fails to see DDL's effect inside a function
 create function xl_getint() returns integer as $$