You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ch...@apache.org on 2025/11/03 13:27:25 UTC

(cloudberry) branch cbdb-postgres-merge updated: Fix answer file for create_type/create_table

This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this push:
     new 80813e3b25f Fix answer file for create_type/create_table
80813e3b25f is described below

commit 80813e3b25fa4c4b824e095e26a6b0fcdec9a605
Author: Jinbao Chen <ch...@gmail.com>
AuthorDate: Mon Nov 3 21:27:07 2025 +0800

    Fix answer file for create_type/create_table
---
 src/test/regress/expected/create_table.out | 201 ------------------------
 src/test/regress/expected/create_type.out  |  23 ++-
 src/test/regress/serial_schedule           |   8 +-
 src/test/regress/sql/create_table.sql      | 237 -----------------------------
 src/test/regress/sql/create_type.sql       |  19 +--
 5 files changed, 22 insertions(+), 466 deletions(-)

diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out
index bdcc29d7b6b..53e6f72289f 100644
--- a/src/test/regress/expected/create_table.out
+++ b/src/test/regress/expected/create_table.out
@@ -1,208 +1,7 @@
 --
 -- CREATE_TABLE
 --
-<<<<<<< HEAD
---
--- CLASS DEFINITIONS
---
-CREATE TABLE hobbies_r (
-	name		text,
-	person 		text
-);
-CREATE TABLE equipment_r (
-	name 		text,
-	hobby		text
-);
-CREATE TABLE onek (
-	unique1		int4,
-	unique2		int4,
-	two			int4,
-	four		int4,
-	ten			int4,
-	twenty		int4,
-	hundred		int4,
-	thousand	int4,
-	twothousand	int4,
-	fivethous	int4,
-	tenthous	int4,
-	odd			int4,
-	even		int4,
-	stringu1	name,
-	stringu2	name,
-	string4		name
-);
-CREATE TABLE tenk1 (
-	unique1		int4,
-	unique2		int4,
-	two			int4,
-	four		int4,
-	ten			int4,
-	twenty		int4,
-	hundred		int4,
-	thousand	int4,
-	twothousand	int4,
-	fivethous	int4,
-	tenthous	int4,
-	odd			int4,
-	even		int4,
-	stringu1	name,
-	stringu2	name,
-	string4		name
-);
-CREATE TABLE tenk2 (
-	unique1 	int4,
-	unique2 	int4,
-	two 	 	int4,
-	four 		int4,
-	ten			int4,
-	twenty 		int4,
-	hundred 	int4,
-	thousand 	int4,
-	twothousand int4,
-	fivethous 	int4,
-	tenthous	int4,
-	odd			int4,
-	even		int4,
-	stringu1	name,
-	stringu2	name,
-	string4		name
-);
-CREATE TABLE person (
-	name 		text,
-	age			int4,
-	location 	point
-);
-CREATE TABLE emp (
-	salary 		int4,
-	manager 	name
-) INHERITS (person);
-CREATE TABLE student (
-	gpa 		float8
-) INHERITS (person);
-CREATE TABLE stud_emp (
-	percent 	int4
-) INHERITS (emp, student);
-NOTICE:  merging multiple inherited definitions of column "name"
-NOTICE:  merging multiple inherited definitions of column "age"
-NOTICE:  merging multiple inherited definitions of column "location"
-CREATE TABLE city (
-	name		name,
-	location 	box,
-	budget 		city_budget
-);
-CREATE TABLE dept (
-	dname		name,
-	mgrname 	text
-);
-CREATE TABLE slow_emp4000 (
-	home_base	 box
-);
-CREATE TABLE fast_emp4000 (
-	home_base	 box
-);
-CREATE TABLE road (
-	name		text,
-	thepath 	path
-);
-CREATE TABLE ihighway () INHERITS (road);
-CREATE TABLE shighway (
-	surface		text
-) INHERITS (road);
-CREATE TABLE real_city (
-	pop			int4,
-	cname		text,
-	outline 	path
-);
---
--- test the "star" operators a bit more thoroughly -- this time,
--- throw in lots of NULL fields...
---
--- a is the type root
--- b and c inherit from a (one-level single inheritance)
--- d inherits from b and c (two-level multiple inheritance)
--- e inherits from c (two-level single inheritance)
--- f inherits from e (three-level single inheritance)
---
-CREATE TABLE a_star (
-	class		char,
-	a 			int4
-);
-CREATE TABLE b_star (
-	b 			text
-) INHERITS (a_star);
-CREATE TABLE c_star (
-	c 			name
-) INHERITS (a_star);
-CREATE TABLE d_star (
-	d 			float8
-) INHERITS (b_star, c_star);
-NOTICE:  merging multiple inherited definitions of column "class"
-NOTICE:  merging multiple inherited definitions of column "a"
-CREATE TABLE e_star (
-	e 			int2
-) INHERITS (c_star);
-CREATE TABLE f_star (
-	f 			polygon
-) INHERITS (e_star);
-CREATE TABLE aggtest (
-	a 			int2,
-	b			float4
-);
-CREATE TABLE hash_i4_heap (
-	seqno 		int4,
-	random 		int4
-) distributed by (seqno);
-CREATE TABLE hash_name_heap (
-	seqno 		int4,
-	random 		name
-) distributed by (seqno);
-CREATE TABLE hash_txt_heap (
-	seqno 		int4,
-	random 		text
-) distributed by (seqno);
-CREATE TABLE hash_f8_heap (
-	seqno		int4,
-	random 		float8
-) distributed by (seqno);
--- don't include the hash_ovfl_heap stuff in the distribution
--- the data set is too large for what it's worth
---
--- CREATE TABLE hash_ovfl_heap (
---	x			int4,
---	y			int4
--- );
-CREATE TABLE bt_i4_heap (
-	seqno 		int4,
-	random 		int4
-);
-CREATE TABLE bt_name_heap (
-	seqno 		name,
-	random 		int4
-);
-CREATE TABLE bt_txt_heap (
-	seqno 		text,
-	random 		int4
-);
-CREATE TABLE bt_f8_heap (
-	seqno 		float8,
-	random 		int4
-);
-CREATE TABLE array_op_test (
-	seqno		int4,
-	i			int4[],
-	t			text[]
-);
-CREATE TABLE array_index_op_test (
-	seqno		int4,
-	i			int4[],
-	t			text[]
-);
-CREATE TABLE testjsonb (
-       j jsonb
-);
-=======
 -- Error cases
->>>>>>> REL_16_9
 CREATE TABLE unknowntab (
 	u unknown    -- fail
 );
diff --git a/src/test/regress/expected/create_type.out b/src/test/regress/expected/create_type.out
index 0fa5c35f08f..03aaf2b8fa9 100644
--- a/src/test/regress/expected/create_type.out
+++ b/src/test/regress/expected/create_type.out
@@ -250,18 +250,6 @@ select format_type('bpchar'::regtype, -1);
  bpchar
 (1 row)
 
-<<<<<<< HEAD
--- Create & Drop type as non-superuser
-CREATE USER user_bob;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-SET SESSION AUTHORIZATION user_bob;
-CREATE TYPE shell; -- not allowed
-ERROR:  must be superuser to create a base type
-CREATE TYPE compfoo as (f1 int, f2 text);
-DROP TYPE compfoo;
-RESET SESSION AUTHORIZATION;
-DROP USER user_bob;
-=======
 -- Test non-error-throwing APIs using widget, which still throws errors
 SELECT pg_input_is_valid('(1,2,3)', 'widget');
  pg_input_is_valid 
@@ -322,7 +310,16 @@ TABLE city;
  Gotham | (1100,334),(1000,34) | 123456,127,-1000,6789
 (2 rows)
 
->>>>>>> REL_16_9
+-- Create & Drop type as non-superuser
+CREATE USER user_bob;
+NOTICE:  resource queue required -- using default resource queue "pg_default"
+SET SESSION AUTHORIZATION user_bob;
+CREATE TYPE shell; -- not allowed
+ERROR:  must be superuser to create a base type
+CREATE TYPE compfoo as (f1 int, f2 text);
+DROP TYPE compfoo;
+RESET SESSION AUTHORIZATION;
+DROP USER user_bob;
 --
 -- Test CREATE/ALTER TYPE using a type that's compatible with varchar,
 -- so we can re-use those support functions
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index eb112bddf8c..c10ea775bd7 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -54,11 +54,11 @@ test: comments
 test: expressions
 test: unicode
 # test: create_function_1
-# test: create_type
-# test: create_table
+test: create_type
+test: create_table
 # test: create_function_2
-# test: copy
-# test: copyselect
+test: copy
+test: copyselect
 # test: copydml
 # test: insert
 # test: insert_conflict
diff --git a/src/test/regress/sql/create_table.sql b/src/test/regress/sql/create_table.sql
index 6b32021f476..52d2ba82a14 100644
--- a/src/test/regress/sql/create_table.sql
+++ b/src/test/regress/sql/create_table.sql
@@ -2,244 +2,7 @@
 -- CREATE_TABLE
 --
 
-<<<<<<< HEAD
---
--- CLASS DEFINITIONS
---
-CREATE TABLE hobbies_r (
-	name		text,
-	person 		text
-);
-
-CREATE TABLE equipment_r (
-	name 		text,
-	hobby		text
-);
-
-CREATE TABLE onek (
-	unique1		int4,
-	unique2		int4,
-	two			int4,
-	four		int4,
-	ten			int4,
-	twenty		int4,
-	hundred		int4,
-	thousand	int4,
-	twothousand	int4,
-	fivethous	int4,
-	tenthous	int4,
-	odd			int4,
-	even		int4,
-	stringu1	name,
-	stringu2	name,
-	string4		name
-);
-
-CREATE TABLE tenk1 (
-	unique1		int4,
-	unique2		int4,
-	two			int4,
-	four		int4,
-	ten			int4,
-	twenty		int4,
-	hundred		int4,
-	thousand	int4,
-	twothousand	int4,
-	fivethous	int4,
-	tenthous	int4,
-	odd			int4,
-	even		int4,
-	stringu1	name,
-	stringu2	name,
-	string4		name
-);
-
-CREATE TABLE tenk2 (
-	unique1 	int4,
-	unique2 	int4,
-	two 	 	int4,
-	four 		int4,
-	ten			int4,
-	twenty 		int4,
-	hundred 	int4,
-	thousand 	int4,
-	twothousand int4,
-	fivethous 	int4,
-	tenthous	int4,
-	odd			int4,
-	even		int4,
-	stringu1	name,
-	stringu2	name,
-	string4		name
-);
-
-
-CREATE TABLE person (
-	name 		text,
-	age			int4,
-	location 	point
-);
-
-
-CREATE TABLE emp (
-	salary 		int4,
-	manager 	name
-) INHERITS (person);
-
-
-CREATE TABLE student (
-	gpa 		float8
-) INHERITS (person);
-
-
-CREATE TABLE stud_emp (
-	percent 	int4
-) INHERITS (emp, student);
-
-
-CREATE TABLE city (
-	name		name,
-	location 	box,
-	budget 		city_budget
-);
-
-CREATE TABLE dept (
-	dname		name,
-	mgrname 	text
-);
-
-CREATE TABLE slow_emp4000 (
-	home_base	 box
-);
-
-CREATE TABLE fast_emp4000 (
-	home_base	 box
-);
-
-CREATE TABLE road (
-	name		text,
-	thepath 	path
-);
-
-CREATE TABLE ihighway () INHERITS (road);
-
-CREATE TABLE shighway (
-	surface		text
-) INHERITS (road);
-
-CREATE TABLE real_city (
-	pop			int4,
-	cname		text,
-	outline 	path
-);
-
---
--- test the "star" operators a bit more thoroughly -- this time,
--- throw in lots of NULL fields...
---
--- a is the type root
--- b and c inherit from a (one-level single inheritance)
--- d inherits from b and c (two-level multiple inheritance)
--- e inherits from c (two-level single inheritance)
--- f inherits from e (three-level single inheritance)
---
-CREATE TABLE a_star (
-	class		char,
-	a 			int4
-);
-
-CREATE TABLE b_star (
-	b 			text
-) INHERITS (a_star);
-
-CREATE TABLE c_star (
-	c 			name
-) INHERITS (a_star);
-
-CREATE TABLE d_star (
-	d 			float8
-) INHERITS (b_star, c_star);
-
-CREATE TABLE e_star (
-	e 			int2
-) INHERITS (c_star);
-
-CREATE TABLE f_star (
-	f 			polygon
-) INHERITS (e_star);
-
-CREATE TABLE aggtest (
-	a 			int2,
-	b			float4
-);
-
-CREATE TABLE hash_i4_heap (
-	seqno 		int4,
-	random 		int4
-) distributed by (seqno);
-
-CREATE TABLE hash_name_heap (
-	seqno 		int4,
-	random 		name
-) distributed by (seqno);
-
-CREATE TABLE hash_txt_heap (
-	seqno 		int4,
-	random 		text
-) distributed by (seqno);
-
-CREATE TABLE hash_f8_heap (
-	seqno		int4,
-	random 		float8
-) distributed by (seqno);
-
--- don't include the hash_ovfl_heap stuff in the distribution
--- the data set is too large for what it's worth
---
--- CREATE TABLE hash_ovfl_heap (
---	x			int4,
---	y			int4
--- );
-
-CREATE TABLE bt_i4_heap (
-	seqno 		int4,
-	random 		int4
-);
-
-CREATE TABLE bt_name_heap (
-	seqno 		name,
-	random 		int4
-);
-
-CREATE TABLE bt_txt_heap (
-	seqno 		text,
-	random 		int4
-);
-
-CREATE TABLE bt_f8_heap (
-	seqno 		float8,
-	random 		int4
-);
-
-CREATE TABLE array_op_test (
-	seqno		int4,
-	i			int4[],
-	t			text[]
-);
-
-CREATE TABLE array_index_op_test (
-	seqno		int4,
-	i			int4[],
-	t			text[]
-);
-
-CREATE TABLE testjsonb (
-       j jsonb
-);
-
-=======
 -- Error cases
->>>>>>> REL_16_9
 CREATE TABLE unknowntab (
 	u unknown    -- fail
 );
diff --git a/src/test/regress/sql/create_type.sql b/src/test/regress/sql/create_type.sql
index 0d0962135f1..62424125fee 100644
--- a/src/test/regress/sql/create_type.sql
+++ b/src/test/regress/sql/create_type.sql
@@ -192,16 +192,6 @@ select format_type('bpchar'::regtype, null);
 -- this behavior difference is intentional
 select format_type('bpchar'::regtype, -1);
 
-<<<<<<< HEAD
--- Create & Drop type as non-superuser
-CREATE USER user_bob;
-SET SESSION AUTHORIZATION user_bob;
-CREATE TYPE shell; -- not allowed
-CREATE TYPE compfoo as (f1 int, f2 text);
-DROP TYPE compfoo;
-RESET SESSION AUTHORIZATION;
-DROP USER user_bob;
-=======
 -- Test non-error-throwing APIs using widget, which still throws errors
 SELECT pg_input_is_valid('(1,2,3)', 'widget');
 SELECT pg_input_is_valid('(1,2)', 'widget');  -- hard error expected
@@ -240,8 +230,15 @@ INSERT INTO city VALUES
 ('Gotham', '(1000,34),(1100,334)', '123456,127,-1000,6789');
 
 TABLE city;
->>>>>>> REL_16_9
 
+-- Create & Drop type as non-superuser
+CREATE USER user_bob;
+SET SESSION AUTHORIZATION user_bob;
+CREATE TYPE shell; -- not allowed
+CREATE TYPE compfoo as (f1 int, f2 text);
+DROP TYPE compfoo;
+RESET SESSION AUTHORIZATION;
+DROP USER user_bob;
 --
 -- Test CREATE/ALTER TYPE using a type that's compatible with varchar,
 -- so we can re-use those support functions


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org