Version / build tested against
origin/main @ eea86b279
Deployment mode
Origin — single node (local)
Engine(s) involved
Not engine-specific / unsure
Summary
The virtual pg_catalog's regclass cast only resolves bare relation names. A quoted-identifier literal — '"g_probe"'::regclass — is not unquoted before lookup and silently resolves to NULL, so catalog queries filtered on it return 0 rows. PostgreSQL strips the double quotes and resolves the relation; standard client libraries and ORMs quote defensively and emit exactly this form for their schema-reflection queries, which therefore silently return nothing. Secondary symptom: a bare SELECT 'name'::regclass renders an empty cell in both quoting forms (PostgreSQL renders the relation name), though the unquoted cast works as a join/filter value.
Steps to reproduce
-- fresh data directory, psql on 6432
CREATE COLLECTION bug042_probe (id BIGINT PRIMARY KEY, name TEXT DEFAULT 'x', qty INT)
WITH (engine = document_strict);
-- unquoted form: works as a filter
SELECT attname FROM pg_attribute WHERE attrelid = 'bug042_probe'::regclass;
-- id / name / qty (3 rows)
-- quoted-identifier form (what defensive clients emit): silently matches nothing
SELECT attname FROM pg_attribute WHERE attrelid = '"bug042_probe"'::regclass;
-- (0 rows) -- expected: same 3 rows
-- bare cast renders empty in both forms
SELECT 'bug042_probe'::regclass;
-- (1 row, empty cell) -- expected: bug042_probe
Expected behavior
'"name"'::regclass unquotes the identifier and resolves like 'name'::regclass (PostgreSQL semantics: double quotes stripped, case preserved). Bare SELECT ...::regclass renders the relation name.
Actual behavior
Quoted form silently resolves to NULL — filtered catalog queries return 0 rows with no error. Bare cast renders an empty cell in both forms.
What actually happened? (check all that are true)
Proposed severity
SEV-2 — High: silently-empty catalog results for the quoting standard clients emit; stored data intact. (Workaround — emit the unquoted form — is available to hand-written SQL but not to stock client libraries.)
Reproducibility
Always — every attempt
Last known-good version / commit (if a regression)
(blank — never worked; the surrounding catalog tables became queryable on 3eaa49873)
Environment & logs
Linux x86_64, release build.
Before submitting
Version / build tested against
origin/main @ eea86b279Deployment mode
Origin — single node (local)
Engine(s) involved
Not engine-specific / unsure
Summary
The virtual pg_catalog's
regclasscast only resolves bare relation names. A quoted-identifier literal —'"g_probe"'::regclass— is not unquoted before lookup and silently resolves to NULL, so catalog queries filtered on it return 0 rows. PostgreSQL strips the double quotes and resolves the relation; standard client libraries and ORMs quote defensively and emit exactly this form for their schema-reflection queries, which therefore silently return nothing. Secondary symptom: a bareSELECT 'name'::regclassrenders an empty cell in both quoting forms (PostgreSQL renders the relation name), though the unquoted cast works as a join/filter value.Steps to reproduce
Expected behavior
'"name"'::regclassunquotes the identifier and resolves like'name'::regclass(PostgreSQL semantics: double quotes stripped, case preserved). BareSELECT ...::regclassrenders the relation name.Actual behavior
Quoted form silently resolves to NULL — filtered catalog queries return 0 rows with no error. Bare cast renders an empty cell in both forms.
What actually happened? (check all that are true)
Proposed severity
SEV-2 — High: silently-empty catalog results for the quoting standard clients emit; stored data intact. (Workaround — emit the unquoted form — is available to hand-written SQL but not to stock client libraries.)
Reproducibility
Always — every attempt
Last known-good version / commit (if a regression)
(blank — never worked; the surrounding catalog tables became queryable on
3eaa49873)Environment & logs
Linux x86_64, release build.
Before submitting
mainbuild (not a stale local branch).