1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00

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
This commit is contained in:
Thomas Munro
2021-05-07 20:17:42 +12:00
parent a288d94c91
commit ec48314708
55 changed files with 463 additions and 1354 deletions

View File

@ -3347,7 +3347,6 @@ _copyAlterTableCmd(const AlterTableCmd *from)
COPY_SCALAR_FIELD(subtype);
COPY_STRING_FIELD(name);
COPY_NODE_FIELD(object);
COPY_SCALAR_FIELD(num);
COPY_NODE_FIELD(newowner);
COPY_NODE_FIELD(def);
@ -3357,6 +3356,16 @@ _copyAlterTableCmd(const AlterTableCmd *from)
return newnode;
}
static AlterCollationStmt *
_copyAlterCollationStmt(const AlterCollationStmt *from)
{
AlterCollationStmt *newnode = makeNode(AlterCollationStmt);
COPY_NODE_FIELD(collname);
return newnode;
}
static AlterDomainStmt *
_copyAlterDomainStmt(const AlterDomainStmt *from)
{
@ -5369,6 +5378,9 @@ copyObjectImpl(const void *from)
case T_AlterTableCmd:
retval = _copyAlterTableCmd(from);
break;
case T_AlterCollationStmt:
retval = _copyAlterCollationStmt(from);
break;
case T_AlterDomainStmt:
retval = _copyAlterDomainStmt(from);
break;