Unqualified pg_catalog casts in pg_dump
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t42102psql -h localhost -U postgresBuilt from patchset v1 (message #1), July 28, 2026 at 02:54 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t42102_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t42102_1 && git checkout t42102_1Patchset v1 (message #1) is on t42102_1
When looking at something different, I happened to notice that pg_dump is a bit
inconsistent in how it qualifies casts to pg_catalog entities like regclass and
oid. Most casts are qualified, but not all. Even though it functionally is
the same, being consistent is a good thing IMO and I can't see a reason not to,
so the attached patch adds qualifications (the unqualified regclass cast in the
TAP test left on purpose).
cheers ./daniel
Daniel Gustafsson <daniel@yesql.se> writes:
When looking at something different, I happened to notice that pg_dump is a bit
inconsistent in how it qualifies casts to pg_catalog entities like regclass and
oid. Most casts are qualified, but not all. Even though it functionally is
the same, being consistent is a good thing IMO and I can't see a reason not to,
so the attached patch adds qualifications (the unqualified regclass cast in the
TAP test left on purpose).
While this used to be important before we made pg_dump force a minimal
search_path, I'm not sure that there's any point in being picky about
it anymore. (psql's describe.c is a different story though.)
regards, tom lane
On 23 Mar 2020, at 17:54, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Daniel Gustafsson <daniel@yesql.se> writes:
When looking at something different, I happened to notice that pg_dump is a bit
inconsistent in how it qualifies casts to pg_catalog entities like regclass and
oid. Most casts are qualified, but not all. Even though it functionally is
the same, being consistent is a good thing IMO and I can't see a reason not to,
so the attached patch adds qualifications (the unqualified regclass cast in the
TAP test left on purpose).While this used to be important before we made pg_dump force a minimal
search_path, I'm not sure that there's any point in being picky about
it anymore. (psql's describe.c is a different story though.)
Correct, there is no functional importance with this. IMO the value is in
readability and grep-ability.
cheers ./daniel