This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 3b2cd6917ad Support parsing `ALTER STATISTICS` in PostgreSQL (#19842)
3b2cd6917ad is described below
commit 3b2cd6917adcaf56836fd05fa27ec01ed656066d
Author: Everly Precia Suresh <[email protected]>
AuthorDate: Thu Aug 4 11:22:45 2022 +0530
Support parsing `ALTER STATISTICS` in PostgreSQL (#19842)
* Support parsing ALTER STATISTICS in PostgreSQL
* apply changes from PR reviews
---
.../main/antlr4/imports/postgresql/DDLStatement.g4 | 2 +-
.../parser/autogen/PostgreSQLStatementParser.g4 | 1 +
.../impl/PostgreSQLDDLStatementSQLVisitor.java | 7 ++++++
.../core/database/visitor/SQLVisitorRule.java | 2 ++
.../statement/ddl/AlterStatisticsStatement.java | 28 +++++++++++++++++++++
.../ddl/PostgreSQLAlterStatisticsStatement.java | 29 ++++++++++++++++++++++
.../jaxb/cases/domain/SQLParserTestCases.java | 4 +++
.../ddl/AlterStatisticsStatementTestCase.java | 26 +++++++++++++++++++
.../main/resources/case/ddl/alter-statistics.xml | 24 ++++++++++++++++++
.../sql/supported/ddl/alter-statistics.xml | 24 ++++++++++++++++++
.../main/resources/sql/unsupported/unsupported.xml | 16 ------------
11 files changed, 146 insertions(+), 17 deletions(-)
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
index 022f6ddaf27..2717ecf349c 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
@@ -1059,7 +1059,7 @@ alterStatistics
( ifExists? anyName SET STATISTICS signedIconst
| anyName RENAME TO name
| anyName SET SCHEMA name
- | anyName OWNER TO roleSpec)
+ | anyName OWNER TO roleSpec )
;
alterSubscription
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
index 9fa94ad0317..eece098dcbc 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
@@ -170,5 +170,6 @@ execute
| createEventTrigger
| createForeignDataWrapper
| createForeignTable
+ | alterStatistics
) SEMI_? EOF
;
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
index 9ee445a60a0..2564a1c8fa1 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
@@ -49,6 +49,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Al
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterSchemaContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterSequenceContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterServerContext;
+import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterStatisticsContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTableActionContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTableContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTablespaceContext;
@@ -219,6 +220,7 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterSchemaStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterSequenceStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterServerStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterStatisticsStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterTableStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterTablespaceStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterTextSearchStatement;
@@ -936,6 +938,11 @@ public final class PostgreSQLDDLStatementSQLVisitor
extends PostgreSQLStatementS
return new PostgreSQLAlterServerStatement();
}
+ @Override
+ public ASTNode visitAlterStatistics(final AlterStatisticsContext ctx) {
+ return new PostgreSQLAlterStatisticsStatement();
+ }
+
@Override
public ASTNode visitDropLanguage(final DropLanguageContext ctx) {
return new PostgreSQLDropLanguageStatement();
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
index 72569bd18a3..d09da03a6c1 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
@@ -170,6 +170,8 @@ public enum SQLVisitorRule {
ALTER_SERVER("AlterServer", SQLStatementType.DDL),
+ ALTER_STATISTICS("AlterStatistics", SQLStatementType.DDL),
+
ALTER_SESSION("AlterSession", SQLStatementType.DDL),
ALTER_SYSTEM("AlterSystem", SQLStatementType.DDL),
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterStatisticsStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterStatisticsStatement.java
new file mode 100644
index 00000000000..e4ec3c41cc0
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterStatisticsStatement.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.common.statement.ddl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+
+/**
+ * Alter statistics statement.
+ */
+@ToString(callSuper = true)
+public abstract class AlterStatisticsStatement extends AbstractSQLStatement
implements DDLStatement {
+}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLAlterStatisticsStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLAlterStatisticsStatement.java
new file mode 100644
index 00000000000..41d4744f823
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLAlterStatisticsStatement.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.AlterStatisticsStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.PostgreSQLStatement;
+
+/**
+ * PostgreSQL alter statistics statement.
+ */
+@ToString(callSuper = true)
+public final class PostgreSQLAlterStatisticsStatement extends
AlterStatisticsStatement implements PostgreSQLStatement {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
index ba19590001a..83302ddc9aa 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
@@ -137,6 +137,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSchemaStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSequenceStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterServerStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterStatisticsStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterServiceStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSessionStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSynonymStatementTestCase;
@@ -652,6 +653,9 @@ public final class SQLParserTestCases {
@XmlElement(name = "alter-server")
private final List<AlterServerStatementTestCase> alterServerTestCases =
new LinkedList<>();
+ @XmlElement(name = "alter-statistics")
+ private final List<AlterStatisticsStatementTestCase>
alterStatisticsTestCases = new LinkedList<>();
+
@XmlElement(name = "alter-session")
private final List<AlterSessionStatementTestCase> alterSessionTestCases =
new LinkedList<>();
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterStatisticsStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterStatisticsStatementTestCase.java
new file mode 100644
index 00000000000..a749254e478
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterStatisticsStatementTestCase.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl;
+
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
+
+/**
+ * Alter statistics statement test case.
+ */
+public final class AlterStatisticsStatementTestCase extends SQLParserTestCase {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-statistics.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-statistics.xml
new file mode 100644
index 00000000000..ade28e8db28
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-statistics.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<sql-parser-test-cases>
+ <alter-statistics sql-case-id="alter_statistics_rename" />
+ <alter-statistics sql-case-id="alter_statistics_set_schema" />
+ <alter-statistics sql-case-id="alter_statistics_set_statistics" />
+ <alter-statistics sql-case-id="alter_statistics_new_owner" />
+</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-statistics.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-statistics.xml
new file mode 100644
index 00000000000..c2c00f1a1bf
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-statistics.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<sql-cases>
+ <sql-case id="alter_statistics_rename" value="ALTER STATISTICS alt_stat1
RENAME TO alt_stat2;" db-types="PostgreSQL" />
+ <sql-case id="alter_statistics_set_schema" value="ALTER STATISTICS
alt_stat3 SET SCHEMA alt_nsp2;" db-types="PostgreSQL" />
+ <sql-case id="alter_statistics_set_statistics" value="ALTER STATISTICS
ab1_a_b_stats SET STATISTICS -1;" db-types="PostgreSQL" />
+ <sql-case id="alter_statistics_new_owner" value="ALTER STATISTICS
alt_stat3 OWNER TO regress_alter_generic_user2;" db-types="PostgreSQL" />
+</sql-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
index dfe78336e71..dec39bf8795 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
@@ -37,7 +37,6 @@
<sql-case id="create_server" value="CREATE SERVER alt_fserv1 FOREIGN DATA
WRAPPER alt_fdw1;" db-types="PostgreSQL" />
<sql-case id="create_operator" value="CREATE OPERATOR @-@ ( leftarg =
int4, rightarg = int4, procedure = int4mi )" db-types="PostgreSQL" />
<sql-case id="create_statistics" value="CREATE STATISTICS alt_stat1 ON a,
b FROM alt_regress_1" db-types="PostgreSQL" />
- <sql-case id="alter_statistics" value="ALTER STATISTICS alt_stat1 RENAME
TO alt_stat2" db-types="PostgreSQL" />
<sql-case id="create_table_no_valid" value="create table nv_parent (d
date, check (false) no inherit not valid)" db-types="PostgreSQL" />
<sql-case id="create_as_select" value="create table attest1 as select *
from atacc1" db-types="PostgreSQL" />
<sql-case id="create_temp_table" value="create temp table old_oids as
select relname, oid as oldoid, relfilenode as oldfilenode from pg_class where
relname like 'at_partitioned%'" db-types="PostgreSQL" />
@@ -3318,21 +3317,6 @@
<sql-case id="alter_by_postgresql_source_test_case214" value="ALTER
OPERATOR FAMILY alt_opf7 USING btree DROP OPERATOR 1 (int4, int2, int8);"
db-types="PostgreSQL" />
<sql-case id="alter_by_postgresql_source_test_case215" value="ALTER
OPERATOR FAMILY alt_opf8 USING btree ADD OPERATOR 1 < (int4, int4);"
db-types="PostgreSQL" />
<sql-case id="alter_by_postgresql_source_test_case216" value="ALTER
OPERATOR FAMILY alt_opf9 USING gist ADD OPERATOR 1 < (int4, int4) FOR ORDER
BY float_ops;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case312" value="ALTER
STATISTICS IF EXISTS ab1_a_b_stats SET STATISTICS 0;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case313" value="ALTER
STATISTICS ab1_a_b_stats RENAME TO ab1_a_b_stats_new;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case314" value="ALTER
STATISTICS ab1_a_b_stats SET STATISTICS -1;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case315" value="ALTER
STATISTICS ab1_a_b_stats SET STATISTICS 0;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case316" value="ALTER
STATISTICS ab1_a_b_stats SET STATISTICS 0;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case317" value="ALTER
STATISTICS alt_stat1 RENAME TO alt_stat2;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case318" value="ALTER
STATISTICS alt_stat1 RENAME TO alt_stat3;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case319" value="ALTER
STATISTICS alt_stat1 RENAME TO alt_stat4;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case320" value="ALTER
STATISTICS alt_stat2 OWNER TO regress_alter_generic_user2;"
db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case321" value="ALTER
STATISTICS alt_stat2 OWNER TO regress_alter_generic_user3;"
db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case322" value="ALTER
STATISTICS alt_stat2 OWNER TO regress_alter_generic_user3;"
db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case323" value="ALTER
STATISTICS alt_stat2 SET SCHEMA alt_nsp2;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case324" value="ALTER
STATISTICS alt_stat3 OWNER TO regress_alter_generic_user2;"
db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case325" value="ALTER
STATISTICS alt_stat3 RENAME TO alt_stat4;" db-types="PostgreSQL" />
- <sql-case id="alter_by_postgresql_source_test_case326" value="ALTER
STATISTICS alt_stat3 SET SCHEMA alt_nsp2; -- failed (not owner)
ALTER STATISTICS alt_stat2 SET SCHEMA alt_nsp2; -- failed (name
conflict) RESET SESSION AUTHORIZATION;" db-types="PostgreSQL" />
<sql-case id="alter_by_postgresql_source_test_case327" value="ALTER
SUBSCRIPTION regress_doesnotexist CONNECTION
'dbname=regress_doesnotexist2';" db-types="PostgreSQL" />
<sql-case id="alter_by_postgresql_source_test_case328" value="ALTER
SUBSCRIPTION regress_testsub ADD PUBLICATION testpub WITH (refresh = false);"
db-types="PostgreSQL" />
<sql-case id="alter_by_postgresql_source_test_case329" value="ALTER
SUBSCRIPTION regress_testsub ADD PUBLICATION testpub1, testpub1 WITH (refresh =
false);" db-types="PostgreSQL" />