forked from huawei/openGauss-server
update gtt_function
This commit is contained in:
commit
8b44ae34f8
|
|
@ -1035,8 +1035,9 @@ static PGPing test_postmaster_connection(pgpid_t pm_pid, bool do_checkpoint, str
|
|||
_("could not stat file gaussdb_state_file %s: %s\n"),
|
||||
gaussdb_state_file,
|
||||
strerror(errno));
|
||||
} else {
|
||||
if (beforeStat.st_mtime != afterStat.st_mtime) {
|
||||
} else if (errno != ENOENT) {
|
||||
if (beforeStat.st_mtim.tv_sec != afterStat.st_mtim.tv_sec ||
|
||||
beforeStat.st_mtim.tv_nsec != afterStat.st_mtim.tv_nsec) {
|
||||
nRet = memset_s(&state, sizeof(state), 0, sizeof(state));
|
||||
securec_check_c(nRet, "\0", "\0");
|
||||
ReadDBStateFile(&state);
|
||||
|
|
|
|||
|
|
@ -524,7 +524,7 @@ FdwRoutine* GetFdwRoutineByServerId(Oid serverid)
|
|||
/* Get foreign-data wrapper OID for the server. */
|
||||
tp = SearchSysCache1(FOREIGNSERVEROID, ObjectIdGetDatum(serverid));
|
||||
if (!HeapTupleIsValid(tp))
|
||||
ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("cache lookup failed for foreign server %u", serverid)));
|
||||
serverform = (Form_pg_foreign_server) GETSTRUCT(tp);
|
||||
fdwid = serverform->srvfdw;
|
||||
|
|
|
|||
|
|
@ -1007,6 +1007,13 @@ Oid DefineIndex(Oid relationId, IndexStmt* stmt, Oid indexRelationId, bool is_al
|
|||
return indexRelationId;
|
||||
}
|
||||
|
||||
// cstore relation doesn't support concurrent INDEX now.
|
||||
if (OidIsValid(rel->rd_rel->relcudescrelid)) {
|
||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("column store table does not support concurrent INDEX yet"),
|
||||
errdetail("The feature is not currently supported")));
|
||||
}
|
||||
|
||||
/* save lockrelid and locktag for below, then close rel */
|
||||
heaprelid = rel->rd_lockInfo.lockRelId;
|
||||
SET_LOCKTAG_RELATION(heaplocktag, heaprelid.dbId, heaprelid.relId);
|
||||
|
|
|
|||
|
|
@ -1846,14 +1846,12 @@ Oid DefineRelation(CreateStmt* stmt, char relkind, Oid ownerId)
|
|||
|
||||
if (colDef->raw_default != NULL) {
|
||||
RawColumnDefault* rawEnt = NULL;
|
||||
|
||||
if (relkind == RELKIND_FOREIGN_TABLE) {
|
||||
if (!(IsA(stmt, CreateForeignTableStmt) &&
|
||||
isMOTTableFromSrvName(((CreateForeignTableStmt*)stmt)->servername)))
|
||||
ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
errmsg("default values on foreign tables are not supported")));
|
||||
}
|
||||
|
||||
Assert(colDef->cooked_default == NULL);
|
||||
rawEnt = (RawColumnDefault*)palloc(sizeof(RawColumnDefault));
|
||||
rawEnt->attnum = attnum;
|
||||
|
|
@ -2508,6 +2506,13 @@ void RemoveRelations(DropStmt* drop, StringInfo tmp_queryString, RemoteQueryExec
|
|||
errmsg("%s is redistributing, please retry later.", delrel->rd_rel->relname.data)));
|
||||
}
|
||||
|
||||
// cstore relation doesn't support concurrent INDEX now.
|
||||
if (drop->concurrent == true && delrel != NULL && OidIsValid(delrel->rd_rel->relcudescrelid)) {
|
||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("column store table does not support concurrent INDEX yet"),
|
||||
errdetail("The feature is not currently supported")));
|
||||
}
|
||||
|
||||
if (delrel != NULL) {
|
||||
relation_close(delrel, NoLock);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2779,7 +2779,7 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi
|
|||
|
||||
switch (((DropStmt*)parse_tree)->removeType) {
|
||||
case OBJECT_INDEX:
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
if (((DropStmt*)parse_tree)->concurrent) {
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
|
|
@ -3928,10 +3928,10 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi
|
|||
} break;
|
||||
|
||||
case T_CreateRangeStmt: /* CREATE TYPE AS RANGE */
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("user defined range type is not yet supported.")));
|
||||
#endif /* PGXC */
|
||||
#endif /* ENABLE_MULTIPLE_NODES */
|
||||
DefineRange((CreateRangeStmt*)parse_tree);
|
||||
#ifdef PGXC
|
||||
if (IS_PGXC_COORDINATOR)
|
||||
|
|
@ -4140,12 +4140,14 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi
|
|||
is_first_node = (strcmp(first_exec_node, g_instance.attr.attr_common.PGXCNodeName) == 0);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
if (stmt->concurrent) {
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("PGXC does not support concurrent INDEX yet"),
|
||||
errdetail("The feature is not currently supported")));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* INDEX on a temporary table cannot use 2PC at commit */
|
||||
rel_id = RangeVarGetRelidExtended(stmt->relation, AccessShareLock, true, false, false, true, NULL, NULL);
|
||||
|
|
@ -8596,7 +8598,7 @@ void CheckObjectInBlackList(ObjectType obj_type, const char* query_string)
|
|||
*/
|
||||
bool CheckExtensionInWhiteList(const char* extension_name, uint32 hash_value, bool hash_check)
|
||||
{
|
||||
/* 2902411162 hash for fastcheck, the sql file is much shorter than published version. */
|
||||
/* 2902411162 hash for fastcheck, the sql file is much shorter than published version. */
|
||||
uint32 postgisHashHistory[POSTGIS_VERSION_NUM] = {2902411162, 2959454932};
|
||||
|
||||
/* check for extension name */
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ select count(*) from pg_node_env;
|
|||
select count(*) from pg_os_threads;
|
||||
count
|
||||
-------
|
||||
29
|
||||
10
|
||||
(1 row)
|
||||
|
||||
-- test backtrace output to log
|
||||
|
|
|
|||
|
|
@ -2203,31 +2203,23 @@ create unique index hash_f8_index_3 on hash_f8_heap(random) where seqno > 1000;
|
|||
CREATE TABLE concur_heap (f1 text, f2 text);
|
||||
-- empty table
|
||||
CREATE INDEX CONCURRENTLY concur_index1 ON concur_heap(f2,f1);
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
INSERT INTO concur_heap VALUES ('a','b');
|
||||
INSERT INTO concur_heap VALUES ('b','b');
|
||||
-- unique index
|
||||
CREATE UNIQUE INDEX CONCURRENTLY concur_index2 ON concur_heap(f1);
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
-- check if constraint is set up properly to be enforced
|
||||
INSERT INTO concur_heap VALUES ('b','x');
|
||||
ERROR: duplicate key value violates unique constraint "concur_index2"
|
||||
DETAIL: Key (f1)=(b) already exists.
|
||||
-- check if constraint is enforced properly at build time
|
||||
CREATE UNIQUE INDEX CONCURRENTLY concur_index3 ON concur_heap(f2);
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
ERROR: could not create unique index "concur_index3"
|
||||
DETAIL: Key (f2)=(b) is duplicated.
|
||||
-- test that expression indexes and partial indexes work concurrently
|
||||
CREATE INDEX CONCURRENTLY concur_index4 on concur_heap(f2) WHERE f1='a';
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
CREATE INDEX CONCURRENTLY concur_index5 on concur_heap(f2) WHERE f1='x';
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
-- here we also check that you can default the index name
|
||||
CREATE INDEX CONCURRENTLY on concur_heap((f2||f1));
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
-- You can't do a concurrent index build in a transaction
|
||||
START TRANSACTION;
|
||||
CREATE INDEX CONCURRENTLY concur_index7 ON concur_heap(f1);
|
||||
|
|
@ -2247,42 +2239,33 @@ Table "public.concur_heap"
|
|||
f1 | text |
|
||||
f2 | text |
|
||||
Indexes:
|
||||
"concur_index2" UNIQUE, btree (f1) TABLESPACE pg_default
|
||||
"concur_index3" UNIQUE, btree (f2) TABLESPACE pg_default INVALID
|
||||
"concur_heap_expr_idx" btree ((f2 || f1)) TABLESPACE pg_default
|
||||
"concur_index1" btree (f2, f1) TABLESPACE pg_default
|
||||
"concur_index4" btree (f2) TABLESPACE pg_default WHERE f1 = 'a'::text
|
||||
"concur_index5" btree (f2) TABLESPACE pg_default WHERE f1 = 'x'::text
|
||||
"std_index" btree (f2) TABLESPACE pg_default
|
||||
|
||||
--
|
||||
-- Try some concurrent index drops
|
||||
--
|
||||
DROP INDEX CONCURRENTLY "concur_index2"; -- works
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
DROP INDEX CONCURRENTLY IF EXISTS "concur_index2"; -- notice
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
NOTICE: index "concur_index2" does not exist, skipping
|
||||
-- failures
|
||||
DROP INDEX CONCURRENTLY "concur_index2", "concur_index3";
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
ERROR: DROP INDEX CONCURRENTLY does not support dropping multiple objects
|
||||
START TRANSACTION;
|
||||
DROP INDEX CONCURRENTLY "concur_index5";
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
ERROR: DROP INDEX CONCURRENTLY cannot run inside a transaction block
|
||||
ROLLBACK;
|
||||
-- successes
|
||||
DROP INDEX CONCURRENTLY IF EXISTS "concur_index3";
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
DROP INDEX CONCURRENTLY "concur_index4";
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
DROP INDEX CONCURRENTLY "concur_index5";
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
DROP INDEX CONCURRENTLY "concur_index1";
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
DROP INDEX CONCURRENTLY "concur_heap_expr_idx";
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
\d concur_heap
|
||||
Table "public.concur_heap"
|
||||
Column | Type | Modifiers
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ select * from gtt6;
|
|||
|
||||
-- ok
|
||||
cluster gtt1 using gtt1_pkey;
|
||||
-- ERROR
|
||||
-- ok
|
||||
create index CONCURRENTLY idx_gtt1 on gtt1 (b);
|
||||
-- ERROR
|
||||
create table gtt1(a int primary key, b text) on commit delete rows;
|
||||
|
|
|
|||
|
|
@ -3230,15 +3230,15 @@ INSERT INTO c VALUES (0), (1);
|
|||
INSERT INTO d VALUES (1,3), (2,2), (3,1);
|
||||
-- all three cases should be optimizable into a simple seqscan
|
||||
explain (verbose on, costs off, nodes off) SELECT a.* FROM a LEFT JOIN b ON a.b_id = b.id;
|
||||
QUERY PLAN
|
||||
----------------------------------------
|
||||
--?.*QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
--? Seq Scan on pg_temp_datanod.*
|
||||
Output: a.id, a.b_id
|
||||
(2 rows)
|
||||
|
||||
explain (verbose on, costs off, nodes off) SELECT b.* FROM b LEFT JOIN c ON b.c_id = c.id;
|
||||
QUERY PLAN
|
||||
----------------------------------------
|
||||
--?.*QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
--? Seq Scan on pg_temp_datanod.*
|
||||
Output: b.id, b.c_id
|
||||
(2 rows)
|
||||
|
|
@ -3246,8 +3246,8 @@ explain (verbose on, costs off, nodes off) SELECT b.* FROM b LEFT JOIN c ON b.c_
|
|||
explain (verbose on, costs off, nodes off)
|
||||
SELECT a.* FROM a LEFT JOIN (b left join c on b.c_id = c.id)
|
||||
ON (a.b_id = b.id);
|
||||
QUERY PLAN
|
||||
----------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?-----------------------------.*
|
||||
--? Seq Scan on pg_temp_datanod.*
|
||||
Output: a.id, a.b_id
|
||||
(2 rows)
|
||||
|
|
@ -3257,8 +3257,8 @@ explain (verbose on, costs off, nodes off)
|
|||
select id from a where id in (
|
||||
select b.id from b left join c on b.id = c.id
|
||||
);
|
||||
QUERY PLAN
|
||||
----------------------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Hash Join
|
||||
Output: a.id
|
||||
Hash Cond: (a.id = b.id)
|
||||
|
|
@ -3275,8 +3275,8 @@ select id from a where id in (
|
|||
explain (verbose on, costs off, nodes off)
|
||||
select d.* from d left join (select * from b group by b.id, b.c_id) s
|
||||
on d.a = s.id and d.b = s.c_id;
|
||||
QUERY PLAN
|
||||
----------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
--? Seq Scan on pg_temp_datanod.*
|
||||
Output: d.a, d.b
|
||||
(2 rows)
|
||||
|
|
@ -3285,8 +3285,8 @@ select d.* from d left join (select * from b group by b.id, b.c_id) s
|
|||
explain (verbose on, costs off, nodes off)
|
||||
select d.* from d left join (select distinct * from b) s
|
||||
on d.a = s.id and d.b = s.c_id;
|
||||
QUERY PLAN
|
||||
----------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
--? Seq Scan on pg_temp_datanod.*
|
||||
Output: d.a, d.b
|
||||
(2 rows)
|
||||
|
|
@ -3296,8 +3296,8 @@ select d.* from d left join (select distinct * from b) s
|
|||
explain (verbose on, costs off, nodes off)
|
||||
select d.* from d left join (select * from b group by b.id, b.c_id) s
|
||||
on d.a = s.id;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Hash Right Join
|
||||
Output: d.a, d.b
|
||||
Hash Cond: (b.id = d.a)
|
||||
|
|
@ -3316,8 +3316,8 @@ select d.* from d left join (select * from b group by b.id, b.c_id) s
|
|||
explain (verbose on, costs off, nodes off)
|
||||
select d.* from d left join (select distinct * from b) s
|
||||
on d.a = s.id;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Hash Right Join
|
||||
Output: d.a, d.b
|
||||
Hash Cond: (b.id = d.a)
|
||||
|
|
@ -3337,8 +3337,8 @@ select d.* from d left join (select distinct * from b) s
|
|||
explain (verbose on, costs off, nodes off)
|
||||
select d.* from d left join (select id from a union select id from b) s
|
||||
on d.a = s.id;
|
||||
QUERY PLAN
|
||||
----------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
--? Seq Scan on pg_temp_datanod.*
|
||||
Output: d.a, d.b
|
||||
(2 rows)
|
||||
|
|
@ -3347,8 +3347,8 @@ select d.* from d left join (select id from a union select id from b) s
|
|||
explain (verbose on, costs off, nodes off)
|
||||
select i8.* from int8_tbl i8 left join (select f1 from int4_tbl group by f1) i4
|
||||
on i8.q1 = i4.f1;
|
||||
QUERY PLAN
|
||||
--------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Seq Scan on public.int8_tbl i8
|
||||
Output: i8.q1, i8.q2
|
||||
(2 rows)
|
||||
|
|
@ -3371,8 +3371,8 @@ select p.* from parent p left join child c on (p.k = c.k) order by 1,2;
|
|||
|
||||
explain (verbose on, costs off, nodes off)
|
||||
select p.* from parent p left join child c on (p.k = c.k) order by 1,2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Sort
|
||||
Output: p.k, p.pd
|
||||
Sort Key: p.k, p.pd
|
||||
|
|
@ -3395,8 +3395,8 @@ explain (verbose on, costs off, nodes off)
|
|||
select p.*, linked from parent p
|
||||
left join (select c.*, true as linked from child c) as ss
|
||||
on (p.k = ss.k) order by p.k;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Merge Left Join
|
||||
Output: p.k, p.pd, (true)
|
||||
Merge Cond: (p.k = c.k)
|
||||
|
|
@ -3418,8 +3418,8 @@ explain (verbose on, costs off, nodes off)
|
|||
select p.* from
|
||||
parent p left join child c on (p.k = c.k)
|
||||
where p.k = 1 and p.k = 2;
|
||||
QUERY PLAN
|
||||
--------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------.*
|
||||
Result
|
||||
Output: p.k, p.pd
|
||||
One-Time Filter: false
|
||||
|
|
@ -3519,8 +3519,8 @@ select t1.* from
|
|||
on (t1.f1 = b1.d1)
|
||||
left join int4_tbl i4
|
||||
on (i8.q2 = i4.f1);
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Hash Left Join
|
||||
Output: t1.f1
|
||||
Hash Cond: (i8.q2 = i4.f1)
|
||||
|
|
@ -3586,8 +3586,8 @@ select t1.* from
|
|||
on (t1.f1 = b1.d1)
|
||||
left join int4_tbl i4
|
||||
on (i8.q2 = i4.f1);
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Hash Left Join
|
||||
Output: t1.f1
|
||||
Hash Cond: (i8.q2 = i4.f1)
|
||||
|
|
@ -3652,8 +3652,8 @@ select * from
|
|||
on t1.f1 = 'doh!'
|
||||
left join int4_tbl i4
|
||||
on i8.q1 = i4.f1;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?----------------------------.*
|
||||
Nested Loop Left Join
|
||||
Output: t1.f1, i8.q1, i8.q2, t2.f1, i4.f1
|
||||
-> Seq Scan on public.text_tbl t2
|
||||
|
|
@ -3700,8 +3700,8 @@ CREATE TABLE mj_t2 (a int,c char(10));
|
|||
insert into mj_t2 values(12,'abcde');
|
||||
insert into mj_t2 values(12,'efghi');
|
||||
explain (nodes off, costs off) select * from mj_t1 full outer join mj_t2 on 1=1;
|
||||
QUERY PLAN
|
||||
-------------------------------
|
||||
--?QUERY PLAN.*
|
||||
--?-----------------------.*
|
||||
Merge Full Join
|
||||
-> Seq Scan on mj_t1
|
||||
-> Materialize
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ SELECT name, setting FROM pg_settings WHERE name LIKE 'enable%' ORDER BY name;
|
|||
enable_sonic_optspill | on
|
||||
enable_sort | on
|
||||
enable_stream_replication | on
|
||||
enable_thread_pool | on
|
||||
enable_thread_pool | off
|
||||
enable_tidscan | on
|
||||
enable_upgrade_merge_lock_mode | off
|
||||
enable_user_metric_persistent | on
|
||||
|
|
|
|||
|
|
@ -2693,7 +2693,7 @@ select count(*) from pg_proc where prokind = 'w';
|
|||
select count(*) from pg_proc where prokind = 'f';
|
||||
count
|
||||
-------
|
||||
3134
|
||||
3142
|
||||
(1 row)
|
||||
|
||||
select count(*) from pg_proc where prokind = 'p';
|
||||
|
|
|
|||
|
|
@ -1,167 +1,195 @@
|
|||
-- Tests for range data types.
|
||||
create type textrange as range (subtype=text, collation="C");
|
||||
ERROR: user defined range type is not yet supported.
|
||||
--
|
||||
-- test input parser
|
||||
--
|
||||
-- negative tests; should fail
|
||||
select ''::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select ''::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
|
||||
(1 row)
|
||||
|
||||
select '-[a,z)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: malformed range literal: "-[a,z)"
|
||||
LINE 1: select '-[a,z)'::textrange;
|
||||
^
|
||||
^
|
||||
DETAIL: Missing left parenthesis or bracket.
|
||||
CONTEXT: referenced column: textrange
|
||||
select '[a,z) - '::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: malformed range literal: "[a,z) - "
|
||||
LINE 1: select '[a,z) - '::textrange;
|
||||
^
|
||||
^
|
||||
DETAIL: Junk after right parenthesis or bracket.
|
||||
CONTEXT: referenced column: textrange
|
||||
select '(",a)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: malformed range literal: "(",a)"
|
||||
LINE 1: select '(",a)'::textrange;
|
||||
^
|
||||
^
|
||||
DETAIL: Unexpected end of input.
|
||||
CONTEXT: referenced column: textrange
|
||||
select '(,,a)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: malformed range literal: "(,,a)"
|
||||
LINE 1: select '(,,a)'::textrange;
|
||||
^
|
||||
^
|
||||
DETAIL: Too many commas.
|
||||
CONTEXT: referenced column: textrange
|
||||
select '(),a)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: malformed range literal: "(),a)"
|
||||
LINE 1: select '(),a)'::textrange;
|
||||
^
|
||||
^
|
||||
DETAIL: Missing comma after lower bound.
|
||||
CONTEXT: referenced column: textrange
|
||||
select '(a,))'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: malformed range literal: "(a,))"
|
||||
LINE 1: select '(a,))'::textrange;
|
||||
^
|
||||
^
|
||||
DETAIL: Junk after right parenthesis or bracket.
|
||||
CONTEXT: referenced column: textrange
|
||||
select '(],a)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: malformed range literal: "(],a)"
|
||||
LINE 1: select '(],a)'::textrange;
|
||||
^
|
||||
^
|
||||
DETAIL: Missing comma after lower bound.
|
||||
CONTEXT: referenced column: textrange
|
||||
select '(a,])'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: malformed range literal: "(a,])"
|
||||
LINE 1: select '(a,])'::textrange;
|
||||
^
|
||||
^
|
||||
DETAIL: Junk after right parenthesis or bracket.
|
||||
CONTEXT: referenced column: textrange
|
||||
select '[z,a]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: range lower bound must be less than or equal to range upper bound
|
||||
LINE 1: select '[z,a]'::textrange;
|
||||
^
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
-- should succeed
|
||||
select ' empty '::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select ' empty '::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
empty
|
||||
(1 row)
|
||||
|
||||
select ' ( empty, empty ) '::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select ' ( empty, empty ) '::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
----------------------
|
||||
(" empty"," empty ")
|
||||
(1 row)
|
||||
|
||||
select ' ( " a " " a ", " z " " z " ) '::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select ' ( " a " " a ", " z " " z " ) '::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
--------------------------
|
||||
(" a a "," z z ")
|
||||
(1 row)
|
||||
|
||||
select '(,z)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '(,z)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
(,z)
|
||||
(1 row)
|
||||
|
||||
select '(a,)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '(a,)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
(a,)
|
||||
(1 row)
|
||||
|
||||
select '[,z]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '[,z]'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
(,z]
|
||||
(1 row)
|
||||
|
||||
select '[a,]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '[a,]'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
[a,)
|
||||
(1 row)
|
||||
|
||||
select '(,)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '(,)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
(,)
|
||||
(1 row)
|
||||
|
||||
select '[ , ]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '[ , ]'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
[" "," "]
|
||||
(1 row)
|
||||
|
||||
select '["",""]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
ERROR: rangetypes.cpp : 2140 : The parameter destMax is equal to zero or larger than the macro : SECUREC_STRING_MAX_LEN.
|
||||
LINE 1: select '["",""]'::textrange;
|
||||
^
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
select '[",",","]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '[",",","]'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
[",",","]
|
||||
(1 row)
|
||||
|
||||
select '["\\","\\"]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '["\\","\\"]'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-------------
|
||||
["\\","\\"]
|
||||
(1 row)
|
||||
|
||||
select '(\\,a)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '(\\,a)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
("\\",a)
|
||||
(1 row)
|
||||
|
||||
select '((,z)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '((,z)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
("(",z)
|
||||
(1 row)
|
||||
|
||||
select '([,z)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '([,z)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
("[",z)
|
||||
(1 row)
|
||||
|
||||
select '(!,()'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '(!,()'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
(!,"(")
|
||||
(1 row)
|
||||
|
||||
select '(!,[)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '(!,[)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
(!,"[")
|
||||
(1 row)
|
||||
|
||||
select '[a,a]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '[a,a]'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
[a,a]
|
||||
(1 row)
|
||||
|
||||
-- these are allowed but normalize to empty:
|
||||
select '[a,a)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '[a,a)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
empty
|
||||
(1 row)
|
||||
|
||||
select '(a,a]'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '(a,a]'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
empty
|
||||
(1 row)
|
||||
|
||||
select '(a,a)'::textrange;
|
||||
ERROR: type "textrange" does not exist
|
||||
LINE 1: select '(a,a)'::textrange;
|
||||
^
|
||||
CONTEXT: referenced column: textrange
|
||||
textrange
|
||||
-----------
|
||||
empty
|
||||
(1 row)
|
||||
|
||||
--
|
||||
-- create some test data and test the operators
|
||||
--
|
||||
|
|
@ -871,35 +899,31 @@ set timezone to default;
|
|||
--
|
||||
--should fail
|
||||
create type float8range as range (subtype=float8, subtype_diff=float4mi);
|
||||
ERROR: user defined range type is not yet supported.
|
||||
ERROR: function float4mi(double precision, double precision) does not exist
|
||||
--should succeed
|
||||
create type float8range as range (subtype=float8, subtype_diff=float8mi);
|
||||
ERROR: user defined range type is not yet supported.
|
||||
select '[123.001, 5.e9)'::float8range @> 888.882::float8;
|
||||
ERROR: type "float8range" does not exist
|
||||
LINE 1: select '[123.001, 5.e9)'::float8range @> 888.882::float8;
|
||||
^
|
||||
?column?
|
||||
----------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
create table float8range_test(f8r float8range, i int);
|
||||
ERROR: type "float8range" does not exist
|
||||
LINE 1: create table float8range_test(f8r float8range, i int);
|
||||
^
|
||||
insert into float8range_test values(float8range(-100.00007, '1.111113e9'), 42);
|
||||
ERROR: relation "float8range_test" does not exist on datanode1
|
||||
LINE 1: insert into float8range_test values(float8range(-100.00007, ...
|
||||
^
|
||||
select * from float8range_test;
|
||||
ERROR: relation "float8range_test" does not exist on datanode1
|
||||
LINE 1: select * from float8range_test;
|
||||
^
|
||||
f8r | i
|
||||
-------------------------+----
|
||||
[-100.00007,1111113000) | 42
|
||||
(1 row)
|
||||
|
||||
drop table float8range_test;
|
||||
ERROR: table "float8range_test" does not exist
|
||||
--
|
||||
-- Test range types over domains
|
||||
--
|
||||
create domain mydomain as int4;
|
||||
ERROR: domain is not yet supported.
|
||||
create type mydomainrange as range(subtype=mydomain);
|
||||
ERROR: user defined range type is not yet supported.
|
||||
ERROR: type "mydomain" does not exist
|
||||
select '[4,50)'::mydomainrange @> 7::mydomain;
|
||||
ERROR: type "mydomainrange" does not exist
|
||||
LINE 1: select '[4,50)'::mydomainrange @> 7::mydomain;
|
||||
|
|
@ -927,23 +951,17 @@ ERROR: type "restrictedrange" does not exist
|
|||
-- Test multiple range types over the same subtype
|
||||
--
|
||||
create type textrange1 as range(subtype=text, collation="C");
|
||||
ERROR: user defined range type is not yet supported.
|
||||
create type textrange2 as range(subtype=text, collation="C");
|
||||
ERROR: user defined range type is not yet supported.
|
||||
select textrange1('a','Z') @> 'b'::text;
|
||||
ERROR: function textrange1(unknown, unknown) does not exist
|
||||
LINE 1: select textrange1('a','Z') @> 'b'::text;
|
||||
^
|
||||
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
|
||||
ERROR: range lower bound must be less than or equal to range upper bound
|
||||
select textrange2('a','z') @> 'b'::text;
|
||||
ERROR: function textrange2(unknown, unknown) does not exist
|
||||
LINE 1: select textrange2('a','z') @> 'b'::text;
|
||||
^
|
||||
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
|
||||
?column?
|
||||
----------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
drop type textrange1;
|
||||
ERROR: type "textrange1" does not exist
|
||||
drop type textrange2;
|
||||
ERROR: type "textrange2" does not exist
|
||||
--
|
||||
-- Test polymorphic type system
|
||||
--
|
||||
|
|
@ -1024,40 +1042,34 @@ drop table i8r_array;
|
|||
-- Ranges of arrays
|
||||
--
|
||||
create type arrayrange as range (subtype=int4[]);
|
||||
ERROR: user defined range type is not yet supported.
|
||||
select arrayrange(ARRAY[1,2], ARRAY[2,1]);
|
||||
ERROR: function arrayrange(integer[], integer[]) does not exist
|
||||
LINE 1: select arrayrange(ARRAY[1,2], ARRAY[2,1]);
|
||||
^
|
||||
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
|
||||
CONTEXT: referenced column: arrayrange
|
||||
arrayrange
|
||||
-------------------
|
||||
["{1,2}","{2,1}")
|
||||
(1 row)
|
||||
|
||||
select arrayrange(ARRAY[2,1], ARRAY[1,2]); -- fail
|
||||
ERROR: function arrayrange(integer[], integer[]) does not exist
|
||||
LINE 1: select arrayrange(ARRAY[2,1], ARRAY[1,2]);
|
||||
^
|
||||
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
|
||||
ERROR: range lower bound must be less than or equal to range upper bound
|
||||
CONTEXT: referenced column: arrayrange
|
||||
select array[1,1] <@ arrayrange(array[1,2], array[2,1]);
|
||||
ERROR: function arrayrange(integer[], integer[]) does not exist
|
||||
LINE 1: select array[1,1] <@ arrayrange(array[1,2], array[2,1]);
|
||||
^
|
||||
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
|
||||
?column?
|
||||
----------
|
||||
f
|
||||
(1 row)
|
||||
|
||||
select array[1,3] <@ arrayrange(array[1,2], array[2,1]);
|
||||
ERROR: function arrayrange(integer[], integer[]) does not exist
|
||||
LINE 1: select array[1,3] <@ arrayrange(array[1,2], array[2,1]);
|
||||
^
|
||||
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
|
||||
?column?
|
||||
----------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
--
|
||||
-- Check behavior when subtype lacks a hash function
|
||||
--
|
||||
create type cashrange as range (subtype = money);
|
||||
ERROR: user defined range type is not yet supported.
|
||||
set enable_sort = off; -- try to make it pick a hash setop implementation
|
||||
select '(2,5)'::cashrange except select '(5,6)'::cashrange;
|
||||
ERROR: type "cashrange" does not exist
|
||||
LINE 1: select '(2,5)'::cashrange except select '(5,6)'::cashrange;
|
||||
^
|
||||
CONTEXT: referenced column: cashrange
|
||||
ERROR: could not identify a hash function for type money
|
||||
reset enable_sort;
|
||||
--
|
||||
-- OUT/INOUT/TABLE functions
|
||||
|
|
|
|||
|
|
@ -3324,7 +3324,6 @@ ERROR: SECURITY LABEL is not yet supported.
|
|||
CREATE TYPE bigobj (INPUT = lo_filein, OUTPUT = lo_fileout, INTERNALLENGTH = VARIABLE);
|
||||
ERROR: function lo_filein(cstring) does not exist
|
||||
CREATE TYPE float8_range AS RANGE (subtype = float8, subtype_diff = float8mi);
|
||||
ERROR: user defined range type is not yet supported.
|
||||
ALTER TYPE colors ADD VALUE 'orange' AFTER 'red';
|
||||
ERROR: type "colors" does not exist
|
||||
CREATE COLLATION french (LOCALE = 'fr_FR.utf8');
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ COPY cstore_insert_t1 FROM '@abs_srcdir@/tmp_check/datanode1/pg_copydir/cstore_c
|
|||
CREATE UNIQUE INDEX unsupport1_idx ON cstore_insert_t1(c1);
|
||||
ERROR: access method "psort" does not support unique indexes
|
||||
CREATE INDEX CONCURRENTLY unsupport2_idx ON cstore_insert_t1(c1);
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
ERROR: column store table does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
CREATE INDEX unsupport3_idx ON cstore_insert_t1(lower(c2));
|
||||
ERROR: access method "psort" does not support index expressions
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ select * from gtt6;
|
|||
-- ok
|
||||
cluster gtt1 using gtt1_pkey;
|
||||
|
||||
-- ERROR
|
||||
-- ok
|
||||
create index CONCURRENTLY idx_gtt1 on gtt1 (b);
|
||||
|
||||
-- ERROR
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
diff --git Makefile Makefile
|
||||
index d5e7b36..34667e1 100644
|
||||
index d5e7b362..34667e12 100644
|
||||
--- Makefile
|
||||
+++ Makefile
|
||||
@@ -31,6 +31,8 @@ else
|
||||
|
|
@ -41,7 +41,7 @@ index d5e7b36..34667e1 100644
|
|||
endif
|
||||
|
||||
diff --git connection.cpp connection.cpp
|
||||
index a517a73..3fc2f20 100644
|
||||
index a517a738..3fc2f201 100644
|
||||
--- connection.cpp
|
||||
+++ connection.cpp
|
||||
@@ -24,6 +24,7 @@
|
||||
|
|
@ -106,7 +106,7 @@ index a517a73..3fc2f20 100644
|
|||
|
||||
/*
|
||||
diff --git deparse.cpp deparse.cpp
|
||||
index a75c270..94b1799 100644
|
||||
index a75c2705..94b1799c 100644
|
||||
--- deparse.cpp
|
||||
+++ deparse.cpp
|
||||
@@ -20,7 +20,7 @@
|
||||
|
|
@ -226,7 +226,7 @@ index a75c270..94b1799 100644
|
|||
}
|
||||
appendStringInfoChar(buf, ']');
|
||||
diff --git mysql_fdw.cpp mysql_fdw.cpp
|
||||
index d518e2e..a56fae6 100644
|
||||
index d518e2ec..a56fae67 100644
|
||||
--- mysql_fdw.cpp
|
||||
+++ mysql_fdw.cpp
|
||||
@@ -53,7 +53,7 @@
|
||||
|
|
@ -509,7 +509,7 @@ index d518e2e..a56fae6 100644
|
|||
if (festate && festate->stmt)
|
||||
{
|
||||
diff --git mysql_fdw.h mysql_fdw.h
|
||||
index 5b543cd..ea58af7 100644
|
||||
index 5b543cd0..ea58af7f 100644
|
||||
--- mysql_fdw.h
|
||||
+++ mysql_fdw.h
|
||||
@@ -135,31 +135,31 @@ extern bool is_foreign_expr(PlannerInfo *root,
|
||||
|
|
@ -592,7 +592,7 @@ index 5b543cd..ea58af7 100644
|
|||
|
||||
/* option.c headers */
|
||||
diff --git mysql_query.cpp mysql_query.cpp
|
||||
index 8c25f5c..6093a5a 100644
|
||||
index 8c25f5cc..64fd770a 100644
|
||||
--- mysql_query.cpp
|
||||
+++ mysql_query.cpp
|
||||
@@ -21,7 +21,7 @@
|
||||
|
|
@ -621,18 +621,19 @@ index 8c25f5c..6093a5a 100644
|
|||
}
|
||||
|
||||
/*
|
||||
@@ -238,8 +239,8 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -238,8 +239,9 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
/* Clear the bind buffer and attributes */
|
||||
memset(&binds[attnum], 0x0, sizeof(MYSQL_BIND));
|
||||
|
||||
- binds[attnum].buffer_type = mysql_from_pgtyp(type);
|
||||
- binds[attnum].is_null = isnull;
|
||||
+ binds[attnum].buffer_type = (enum_field_types)mysql_from_pgtyp(type);
|
||||
+ binds[attnum].is_null = (my_bool*)isnull;
|
||||
+ binds[attnum].is_null = (my_bool*)palloc(sizeof(my_bool));
|
||||
+ *(binds[attnum].is_null) = *isnull;
|
||||
|
||||
/* Avoid to bind buffer in case value is NULL */
|
||||
if (*isnull)
|
||||
@@ -250,7 +251,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -250,7 +252,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
case INT2OID:
|
||||
{
|
||||
int16 dat = DatumGetInt16(value);
|
||||
|
|
@ -641,7 +642,7 @@ index 8c25f5c..6093a5a 100644
|
|||
memcpy(bufptr, (char*)&dat, sizeof(int16));
|
||||
|
||||
binds[attnum].buffer = bufptr;
|
||||
@@ -259,7 +260,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -259,7 +261,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
case INT4OID:
|
||||
{
|
||||
int32 dat = DatumGetInt32(value);
|
||||
|
|
@ -650,7 +651,7 @@ index 8c25f5c..6093a5a 100644
|
|||
memcpy(bufptr, (char*)&dat, sizeof(int32));
|
||||
|
||||
binds[attnum].buffer = bufptr;
|
||||
@@ -268,7 +269,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -268,7 +270,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
case INT8OID:
|
||||
{
|
||||
int64 dat = DatumGetInt64(value);
|
||||
|
|
@ -659,7 +660,7 @@ index 8c25f5c..6093a5a 100644
|
|||
memcpy(bufptr, (char*)&dat, sizeof(int64));
|
||||
|
||||
binds[attnum].buffer = bufptr;
|
||||
@@ -277,7 +278,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -277,7 +279,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
case FLOAT4OID:
|
||||
{
|
||||
float4 dat = DatumGetFloat4(value);
|
||||
|
|
@ -668,7 +669,7 @@ index 8c25f5c..6093a5a 100644
|
|||
memcpy(bufptr, (char*)&dat, sizeof(float4));
|
||||
|
||||
binds[attnum].buffer = bufptr;
|
||||
@@ -286,7 +287,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -286,7 +288,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
case FLOAT8OID:
|
||||
{
|
||||
float8 dat = DatumGetFloat8(value);
|
||||
|
|
@ -677,7 +678,7 @@ index 8c25f5c..6093a5a 100644
|
|||
memcpy(bufptr, (char*)&dat, sizeof(float8));
|
||||
|
||||
binds[attnum].buffer = bufptr;
|
||||
@@ -296,7 +297,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -296,7 +298,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
{
|
||||
Datum valueDatum = DirectFunctionCall1(numeric_float8, value);
|
||||
float8 dat = DatumGetFloat8(valueDatum);
|
||||
|
|
@ -686,7 +687,7 @@ index 8c25f5c..6093a5a 100644
|
|||
memcpy(bufptr, (char*)&dat, sizeof(float8));
|
||||
|
||||
binds[attnum].buffer = bufptr;
|
||||
@@ -305,7 +306,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -305,7 +307,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
case BOOLOID:
|
||||
{
|
||||
int32 dat = DatumGetInt32(value);
|
||||
|
|
@ -695,7 +696,7 @@ index 8c25f5c..6093a5a 100644
|
|||
memcpy(bufptr, (char*)&dat, sizeof(int32));
|
||||
|
||||
binds[attnum].buffer = bufptr;
|
||||
@@ -348,7 +349,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -348,7 +350,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
|
||||
Datum valueDatum = DirectFunctionCall1(date_timestamp, value);
|
||||
Timestamp valueTimestamp = DatumGetTimestamp(valueDatum);
|
||||
|
|
@ -704,7 +705,7 @@ index 8c25f5c..6093a5a 100644
|
|||
|
||||
timestamp2tm(valueTimestamp, &tz, tm, &fsec, &tzn, pg_tzset("UTC"));
|
||||
|
||||
@@ -364,7 +365,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -364,7 +366,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
case TIMESTAMPTZOID:
|
||||
{
|
||||
Timestamp valueTimestamp = DatumGetTimestamp(value);
|
||||
|
|
@ -713,7 +714,7 @@ index 8c25f5c..6093a5a 100644
|
|||
|
||||
int tz;
|
||||
struct pg_tm tt,
|
||||
@@ -384,7 +385,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -384,7 +386,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
case BITOID:
|
||||
{
|
||||
int32 dat;
|
||||
|
|
@ -722,7 +723,7 @@ index 8c25f5c..6093a5a 100644
|
|||
char *outputString = NULL;
|
||||
Oid outputFunctionId = InvalidOid;
|
||||
bool typeVarLength = false;
|
||||
@@ -412,7 +413,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
@@ -412,7 +414,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i
|
||||
len = VARSIZE_4B(result) - VARHDRSZ;
|
||||
dat = VARDATA_4B(result);
|
||||
}
|
||||
|
|
@ -731,7 +732,7 @@ index 8c25f5c..6093a5a 100644
|
|||
memcpy(bufptr, (char*)dat, len);
|
||||
binds[attnum].buffer = bufptr;
|
||||
binds[attnum].buffer_length = len;
|
||||
@@ -438,9 +439,9 @@ void
|
||||
@@ -438,9 +440,9 @@ void
|
||||
mysql_bind_result(Oid pgtyp, int pgtypmod, MYSQL_FIELD *field, mysql_column *column)
|
||||
{
|
||||
MYSQL_BIND *mbind = column->_mysql_bind;
|
||||
|
|
@ -744,7 +745,7 @@ index 8c25f5c..6093a5a 100644
|
|||
switch (pgtyp)
|
||||
{
|
||||
diff --git option.cpp option.cpp
|
||||
index 574cb24..5c92c50 100644
|
||||
index 574cb24a..5c92c50f 100644
|
||||
--- option.cpp
|
||||
+++ option.cpp
|
||||
@@ -81,7 +81,7 @@ static struct MySQLFdwOption valid_options[] =
|
||||
|
|
|
|||
Loading…
Reference in New Issue