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