aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2021-05-07 20:17:42 +1200
committerThomas Munro <tmunro@postgresql.org>2021-05-07 21:10:11 +1200
commitec48314708262d8ea6cdcb83f803fc83dd89e721 (patch)
treef5b7c82ea571ce78aaa355095dd588dce07349ff /src/backend/parser
parenta288d94c91e345ebeb10ac30f247270c8c8e380a (diff)
downloadpostgresql-ec48314708262d8ea6cdcb83f803fc83dd89e721.tar.gz
postgresql-ec48314708262d8ea6cdcb83f803fc83dd89e721.zip
Revert per-index collation version tracking feature.
Design problems were discovered in the handling of composite types and record types that would cause some relevant versions not to be recorded. Misgivings were also expressed about the use of the pg_depend catalog for this purpose. We're out of time for this release so we'll revert and try again. Commits reverted: 1bf946bd: Doc: Document known problem with Windows collation versions. cf002008: Remove no-longer-relevant test case. ef387bed: Fix bogus collation-version-recording logic. 0fb0a050: Hide internal error for pg_collation_actual_version(<bad OID>). ff942057: Suppress "warning: variable 'collcollate' set but not used". d50e3b1f: Fix assertion in collation version lookup. f24b1569: Rethink extraction of collation dependencies. 257836a7: Track collation versions for indexes. cd6f479e: Add pg_depend.refobjversion. 7d1297df: Remove pg_collation.collversion. Discussion: https://postgr.es/m/CA%2BhUKGLhj5t1fcjqAu8iD9B3ixJtsTNqyCCD4V0aTO9kAKAjjA%40mail.gmail.com
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index b4ab4014c87..aaf1a51f685 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -263,7 +263,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
}
%type <node> stmt toplevel_stmt schema_stmt routine_body_stmt
- AlterEventTrigStmt
+ AlterEventTrigStmt AlterCollationStmt
AlterDatabaseStmt AlterDatabaseSetStmt AlterDomainStmt AlterEnumStmt
AlterFdwStmt AlterForeignServerStmt AlterGroupStmt
AlterObjectDependsStmt AlterObjectSchemaStmt AlterOwnerStmt
@@ -902,6 +902,7 @@ toplevel_stmt:
stmt:
AlterEventTrigStmt
+ | AlterCollationStmt
| AlterDatabaseStmt
| AlterDatabaseSetStmt
| AlterDefaultPrivilegesStmt
@@ -2682,14 +2683,6 @@ alter_table_cmd:
n->subtype = AT_NoForceRowSecurity;
$$ = (Node *)n;
}
- /* ALTER INDEX <name> ALTER COLLATION ... REFRESH VERSION */
- | ALTER COLLATION any_name REFRESH VERSION_P
- {
- AlterTableCmd *n = makeNode(AlterTableCmd);
- n->subtype = AT_AlterCollationRefreshVersion;
- n->object = $3;
- $$ = (Node *)n;
- }
| alter_generic_options
{
AlterTableCmd *n = makeNode(AlterTableCmd);
@@ -10379,6 +10372,21 @@ drop_option:
/*****************************************************************************
*
+ * ALTER COLLATION
+ *
+ *****************************************************************************/
+
+AlterCollationStmt: ALTER COLLATION any_name REFRESH VERSION_P
+ {
+ AlterCollationStmt *n = makeNode(AlterCollationStmt);
+ n->collname = $3;
+ $$ = (Node *)n;
+ }
+ ;
+
+
+/*****************************************************************************
+ *
* ALTER SYSTEM
*
* This is used to change configuration parameters persistently.