!1625 修复postgis创建postgis_topology扩展不支持的问题

Merge pull request !1625 from zhangxubo/3.0.0_dev
This commit is contained in:
opengauss-bot 2022-03-26 06:12:46 +00:00 committed by Gitee
commit b710043d0c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 6 additions and 16 deletions

View File

@ -5720,8 +5720,10 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi
* ******************************** DOMAIN statements ****
*/
case T_CreateDomainStmt:
#ifdef ENABLE_MULTIPLE_NODES
if (!IsInitdb && !u_sess->attr.attr_common.IsInplaceUpgrade)
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("domain is not yet supported.")));
#endif
DefineDomain((CreateDomainStmt*)parse_tree);
#ifdef PGXC
if (IS_PGXC_COORDINATOR)

View File

@ -58,9 +58,7 @@ ERROR: type "test_domain_exists" does not exist
DROP DOMAIN IF EXISTS test_domain_exists;
NOTICE: type "test_domain_exists" does not exist, skipping
CREATE domain test_domain_exists as int not null check (value > 0);
ERROR: domain is not yet supported.
DROP DOMAIN IF EXISTS test_domain_exists;
NOTICE: type "test_domain_exists" does not exist, skipping
DROP DOMAIN test_domain_exists;
ERROR: type "test_domain_exists" does not exist
---

View File

@ -473,25 +473,15 @@ INSERT INTO gtest23q VALUES (2, 5); -- error
ERROR: insert or update on table "gtest23q" violates foreign key constraint "gtest23q_b_fkey"
DETAIL: Key (b)=(5) is not present in table "gtest23p".
DROP TABLE gtest23q;
-- domains (domain is not yet supported.)
-- domains
CREATE DOMAIN gtestdomain1 AS int CHECK (VALUE < 10);
ERROR: domain is not yet supported.
CREATE TABLE gtest24 (a int PRIMARY KEY, b gtestdomain1 GENERATED ALWAYS AS (a * 2) STORED);
ERROR: type "gtestdomain1" does not exist
LINE 1: CREATE TABLE gtest24 (a int PRIMARY KEY, b gtestdomain1 GENE...
^
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "gtest24_pkey" for table "gtest24"
INSERT INTO gtest24 (a) VALUES (4); -- ok
ERROR: relation "gtest24" does not exist on datanode1
LINE 1: INSERT INTO gtest24 (a) VALUES (4);
^
INSERT INTO gtest24 (a) VALUES (6); -- error
ERROR: relation "gtest24" does not exist on datanode1
LINE 1: INSERT INTO gtest24 (a) VALUES (6);
^
ERROR: value for domain gtestdomain1 violates check constraint "gtestdomain1_check"
DROP TABLE gtest24;
ERROR: table "gtest24" does not exist
DROP DOMAIN gtestdomain1;
ERROR: type "gtestdomain1" does not exist
-- typed tables (currently not supported)
CREATE TYPE gtest_type AS (f1 integer, f2 text, f3 bigint);
CREATE TABLE gtest28 OF gtest_type (f1 WITH OPTIONS GENERATED ALWAYS AS (f2 *2) STORED);

View File

@ -266,7 +266,7 @@ INSERT INTO gtest23q VALUES (2, 5); -- error
DROP TABLE gtest23q;
-- domains (domain is not yet supported.)
-- domains
CREATE DOMAIN gtestdomain1 AS int CHECK (VALUE < 10);
CREATE TABLE gtest24 (a int PRIMARY KEY, b gtestdomain1 GENERATED ALWAYS AS (a * 2) STORED);
INSERT INTO gtest24 (a) VALUES (4); -- ok