mirror of https://github.com/citusdata/citus.git
Changelog: error out if index has opclassopts
Error out if index has opclassopts. Changelog entry on PG13: Allow CREATE INDEX to specify the GiST signature length and maximum number of integer ranges (Nikita Glukhov)pull/3900/head
parent
f7a1971361
commit
d0b0c88920
|
@ -37,6 +37,7 @@
|
||||||
#include "commands/defrem.h"
|
#include "commands/defrem.h"
|
||||||
#include "commands/extension.h"
|
#include "commands/extension.h"
|
||||||
#include "distributed/citus_ruleutils.h"
|
#include "distributed/citus_ruleutils.h"
|
||||||
|
#include "distributed/listutils.h"
|
||||||
#include "distributed/multi_partitioning_utils.h"
|
#include "distributed/multi_partitioning_utils.h"
|
||||||
#include "distributed/relay_utility.h"
|
#include "distributed/relay_utility.h"
|
||||||
#include "distributed/metadata_utility.h"
|
#include "distributed/metadata_utility.h"
|
||||||
|
@ -813,6 +814,11 @@ deparse_index_columns(StringInfo buffer, List *indexParameterList, List *deparse
|
||||||
appendStringInfo(buffer, "%s ",
|
appendStringInfo(buffer, "%s ",
|
||||||
NameListToQuotedString(indexElement->opclass));
|
NameListToQuotedString(indexElement->opclass));
|
||||||
}
|
}
|
||||||
|
#if PG_VERSION_NUM >= PG_VERSION_13
|
||||||
|
if (indexElement->opclassopts != NIL) {
|
||||||
|
ereport(ERROR, errmsg("citus currently doesn't support this index arguments"));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (indexElement->ordering != SORTBY_DEFAULT)
|
if (indexElement->ordering != SORTBY_DEFAULT)
|
||||||
{
|
{
|
||||||
|
|
|
@ -153,8 +153,18 @@ CREATE TABLE my_table (a int, b myvarchar);
|
||||||
SELECT create_distributed_table('my_table', 'a');
|
SELECT create_distributed_table('my_table', 'a');
|
||||||
ERROR: type "test_pg13.myvarchar" does not exist
|
ERROR: type "test_pg13.myvarchar" does not exist
|
||||||
CONTEXT: while executing command on localhost:xxxxx
|
CONTEXT: while executing command on localhost:xxxxx
|
||||||
|
CREATE TABLE test_table(a int, b tsvector);
|
||||||
|
SELECT create_distributed_table('test_table', 'a');
|
||||||
|
create_distributed_table
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
-- we currently don't support this
|
||||||
|
CREATE INDEX test_table_index ON test_table USING gist (b tsvector_ops(siglen = 100));
|
||||||
|
ERROR: citus currently doesn't support this index arguments
|
||||||
drop schema test_pg13 cascade;
|
drop schema test_pg13 cascade;
|
||||||
NOTICE: drop cascades to 9 other objects
|
NOTICE: drop cascades to 10 other objects
|
||||||
DETAIL: drop cascades to table dist_table
|
DETAIL: drop cascades to table dist_table
|
||||||
drop cascades to table generated_col_table
|
drop cascades to table generated_col_table
|
||||||
drop cascades to view v
|
drop cascades to view v
|
||||||
|
@ -164,3 +174,4 @@ drop cascades to function myvarcharout(myvarchar)
|
||||||
drop cascades to type myvarchar
|
drop cascades to type myvarchar
|
||||||
drop cascades to function myvarcharin(cstring,oid,integer)
|
drop cascades to function myvarcharin(cstring,oid,integer)
|
||||||
drop cascades to table my_table
|
drop cascades to table my_table
|
||||||
|
drop cascades to table test_table
|
||||||
|
|
|
@ -81,4 +81,9 @@ CREATE TABLE my_table (a int, b myvarchar);
|
||||||
-- like TOAST and I/O functions control (Tomas Vondra, Tom Lane)"""
|
-- like TOAST and I/O functions control (Tomas Vondra, Tom Lane)"""
|
||||||
SELECT create_distributed_table('my_table', 'a');
|
SELECT create_distributed_table('my_table', 'a');
|
||||||
|
|
||||||
|
CREATE TABLE test_table(a int, b tsvector);
|
||||||
|
SELECT create_distributed_table('test_table', 'a');
|
||||||
|
-- we currently don't support this
|
||||||
|
CREATE INDEX test_table_index ON test_table USING gist (b tsvector_ops(siglen = 100));
|
||||||
|
|
||||||
drop schema test_pg13 cascade;
|
drop schema test_pg13 cascade;
|
Loading…
Reference in New Issue