pgsql: Change pg_seclabel.provider and pg_shseclabel.provider to type " - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Change pg_seclabel.provider and pg_shseclabel.provider to type "
Date
Msg-id E1YuV4n-0007b2-GW@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Change pg_seclabel.provider and pg_shseclabel.provider to type "
List pgsql-committers
Change pg_seclabel.provider and pg_shseclabel.provider to type "name".

These were "text", but that's a bad idea because it has collation-dependent
ordering.  No index in template0 should have collation-dependent ordering,
especially not indexes on shared catalogs.  There was general agreement
that provider names don't need to be longer than other identifiers, so we
can fix this at a small waste of table space by changing from text to name.

There's no way to fix the problem in the back branches, but we can hope
that security labels don't yet have widespread-enough usage to make it
urgent to fix.

There needs to be a regression sanity test to prevent us from making this
same mistake again; but before putting that in, we'll need to get rid of
similar brain fade in the recently-added pg_replication_origin catalog.

Note: for lack of a suitable testing environment, I've not really exercised
this change.  I trust the buildfarm will show up any mistakes.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b82a7be603f1811a0a707b53c62de6d5d9431740

Modified Files
--------------
doc/src/sgml/catalogs.sgml          |    6 +++---
src/backend/commands/seclabel.c     |   24 ++++++++++++++----------
src/include/catalog/catversion.h    |    2 +-
src/include/catalog/indexing.h      |    4 ++--
src/include/catalog/pg_seclabel.h   |    2 +-
src/include/catalog/pg_shseclabel.h |    2 +-
6 files changed, 22 insertions(+), 18 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Attach ON CONFLICT SET ... WHERE to the correct planstate.
Next
From: andres@anarazel.de (Andres Freund)
Date:
Subject: Re: pgsql: Change pg_seclabel.provider and pg_shseclabel.provider to type "