aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_clause.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-05-19 11:47:42 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-05-19 11:47:42 -0400
commit0b28ea79c044a0d3779081dc909a6dc0ce93b991 (patch)
tree1a0e55210329ac20fd63088f8c06e7be87ab9878 /src/backend/parser/parse_clause.c
parentafee04352bc01b79cde33c018a82c2eeb1ce84eb (diff)
downloadpostgresql-0b28ea79c044a0d3779081dc909a6dc0ce93b991.tar.gz
postgresql-0b28ea79c044a0d3779081dc909a6dc0ce93b991.zip
Avoid collation dependence in indexes of system catalogs.
No index in template0 should have collation-dependent ordering, especially not indexes on shared catalogs. For most textual columns we avoid this issue by using type "name" (which sorts per strcmp()). However there are a few indexed columns that we'd prefer to use "text" for, and for that, the default opclass text_ops is unsafe. Fortunately, text_pattern_ops is safe (it sorts per memcmp()), and it has no real functional disadvantage for our purposes. So change the indexes on pg_seclabel.provider and pg_shseclabel.provider to use text_pattern_ops. In passing, also mark pg_replication_origin.roname as using text_pattern_ops --- for some reason it was labeled varchar_pattern_ops which is just wrong, even though it accidentally worked. Add regression test queries to catch future errors of these kinds. We still can't do anything about the misdeclared pg_seclabel and pg_shseclabel indexes in back branches :-(
Diffstat (limited to 'src/backend/parser/parse_clause.c')
0 files changed, 0 insertions, 0 deletions