Re: pg_filenode_relation(0,0) elog
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-06-12T03:51:35Z
Lists: pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes: > Per sqlsmith. > postgres=# SELECT pg_filenode_relation(0,0); > ERROR: unexpected duplicate for tablespace 0, relfilenode 0 Ugh. > The usual expectation is that sql callable functions should return null rather > than hitting elog(). Agreed, but you should put the short-circuit into the SQL-callable function, ie pg_filenode_relation. Lower-level callers ought not be passing junk data. Likely it should check the reltablespace, too. regards, tom lane
Commits
-
Ensure pg_filenode_relation(0, 0) returns NULL.
- f479ea94bd24 13.4 landed
- c1ffbbcbca93 9.6.23 landed
- 7681b78fba10 12.8 landed
- 26a0535334ce 10.18 landed
- 25d1ef1aaf6d 11.13 landed
- 1250aad42520 14.0 landed