aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsquery_gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-12-31 11:39:26 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-12-31 11:39:26 -0500
commitd5e8930f50e31d836d84b353b9dadedd5007bb70 (patch)
treedf18cd0fa3930278dfdcabbc23600e8e002945b8 /src/backend/utils/adt/tsquery_gist.c
parent93d97349461347d952e8cebdf62f5aa84b4bd20a (diff)
downloadpostgresql-d5e8930f50e31d836d84b353b9dadedd5007bb70.tar.gz
postgresql-d5e8930f50e31d836d84b353b9dadedd5007bb70.zip
pg_dump: minor performance improvements from eliminating sub-SELECTs.
Get rid of the "username_subquery" mechanism in favor of doing local lookups of role names from role OIDs. The PG backend isn't terribly smart about scalar SubLinks in SELECT output lists, so this offers a small performance improvement, at least in installations with more than a couple of users. In any case the old method didn't make for particularly readable SQL code. While at it, I removed the various custom warning messages about failing to find an object's owner, in favor of just fatal'ing in the local lookup function. AFAIK there is no reason any longer to treat that as anything but a catalog-corruption case, and certainly no reason to make translators deal with a dozen different messages where one would do. (If it turns out that fatal() is indeed a bad idea, we can back off to issuing pg_log_warning() and returning an empty string, resulting in the same behavior as before, except more consistent.) Also drop an entirely unnecessary sub-SELECT to check on the pg_depend status of a sequence relation: we already have a LEFT JOIN to fetch the row of interest in the FROM clause. Discussion: https://postgr.es/m/2460369.1640903318@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/tsquery_gist.c')
0 files changed, 0 insertions, 0 deletions