forked from huawei/openGauss-server
!1625 修复postgis创建postgis_topology扩展不支持的问题
Merge pull request !1625 from zhangxubo/3.0.0_dev
This commit is contained in:
commit
b710043d0c
|
|
@ -5720,8 +5720,10 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi
|
||||||
* ******************************** DOMAIN statements ****
|
* ******************************** DOMAIN statements ****
|
||||||
*/
|
*/
|
||||||
case T_CreateDomainStmt:
|
case T_CreateDomainStmt:
|
||||||
|
#ifdef ENABLE_MULTIPLE_NODES
|
||||||
if (!IsInitdb && !u_sess->attr.attr_common.IsInplaceUpgrade)
|
if (!IsInitdb && !u_sess->attr.attr_common.IsInplaceUpgrade)
|
||||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("domain is not yet supported.")));
|
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("domain is not yet supported.")));
|
||||||
|
#endif
|
||||||
DefineDomain((CreateDomainStmt*)parse_tree);
|
DefineDomain((CreateDomainStmt*)parse_tree);
|
||||||
#ifdef PGXC
|
#ifdef PGXC
|
||||||
if (IS_PGXC_COORDINATOR)
|
if (IS_PGXC_COORDINATOR)
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,7 @@ ERROR: type "test_domain_exists" does not exist
|
||||||
DROP DOMAIN IF EXISTS test_domain_exists;
|
DROP DOMAIN IF EXISTS test_domain_exists;
|
||||||
NOTICE: type "test_domain_exists" does not exist, skipping
|
NOTICE: type "test_domain_exists" does not exist, skipping
|
||||||
CREATE domain test_domain_exists as int not null check (value > 0);
|
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;
|
DROP DOMAIN IF EXISTS test_domain_exists;
|
||||||
NOTICE: type "test_domain_exists" does not exist, skipping
|
|
||||||
DROP DOMAIN test_domain_exists;
|
DROP DOMAIN test_domain_exists;
|
||||||
ERROR: type "test_domain_exists" does not exist
|
ERROR: type "test_domain_exists" does not exist
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -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"
|
ERROR: insert or update on table "gtest23q" violates foreign key constraint "gtest23q_b_fkey"
|
||||||
DETAIL: Key (b)=(5) is not present in table "gtest23p".
|
DETAIL: Key (b)=(5) is not present in table "gtest23p".
|
||||||
DROP TABLE gtest23q;
|
DROP TABLE gtest23q;
|
||||||
-- domains (domain is not yet supported.)
|
-- domains
|
||||||
CREATE DOMAIN gtestdomain1 AS int CHECK (VALUE < 10);
|
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);
|
CREATE TABLE gtest24 (a int PRIMARY KEY, b gtestdomain1 GENERATED ALWAYS AS (a * 2) STORED);
|
||||||
ERROR: type "gtestdomain1" does not exist
|
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "gtest24_pkey" for table "gtest24"
|
||||||
LINE 1: CREATE TABLE gtest24 (a int PRIMARY KEY, b gtestdomain1 GENE...
|
|
||||||
^
|
|
||||||
INSERT INTO gtest24 (a) VALUES (4); -- ok
|
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
|
INSERT INTO gtest24 (a) VALUES (6); -- error
|
||||||
ERROR: relation "gtest24" does not exist on datanode1
|
ERROR: value for domain gtestdomain1 violates check constraint "gtestdomain1_check"
|
||||||
LINE 1: INSERT INTO gtest24 (a) VALUES (6);
|
|
||||||
^
|
|
||||||
DROP TABLE gtest24;
|
DROP TABLE gtest24;
|
||||||
ERROR: table "gtest24" does not exist
|
|
||||||
DROP DOMAIN gtestdomain1;
|
DROP DOMAIN gtestdomain1;
|
||||||
ERROR: type "gtestdomain1" does not exist
|
|
||||||
-- typed tables (currently not supported)
|
-- typed tables (currently not supported)
|
||||||
CREATE TYPE gtest_type AS (f1 integer, f2 text, f3 bigint);
|
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);
|
CREATE TABLE gtest28 OF gtest_type (f1 WITH OPTIONS GENERATED ALWAYS AS (f2 *2) STORED);
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ INSERT INTO gtest23q VALUES (2, 5); -- error
|
||||||
|
|
||||||
DROP TABLE gtest23q;
|
DROP TABLE gtest23q;
|
||||||
|
|
||||||
-- domains (domain is not yet supported.)
|
-- domains
|
||||||
CREATE DOMAIN gtestdomain1 AS int CHECK (VALUE < 10);
|
CREATE DOMAIN gtestdomain1 AS int CHECK (VALUE < 10);
|
||||||
CREATE TABLE gtest24 (a int PRIMARY KEY, b gtestdomain1 GENERATED ALWAYS AS (a * 2) STORED);
|
CREATE TABLE gtest24 (a int PRIMARY KEY, b gtestdomain1 GENERATED ALWAYS AS (a * 2) STORED);
|
||||||
INSERT INTO gtest24 (a) VALUES (4); -- ok
|
INSERT INTO gtest24 (a) VALUES (4); -- ok
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue