Re: pg_filenode_relation(0,0) elog

2021-06-12 Thread Tom Lane
Justin Pryzby writes: > On Fri, Jun 11, 2021 at 11:51:35PM -0400, Tom Lane wrote: >> Likely it should check the reltablespace, too. > I don't think so. The docs say: > https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-DBLOCATION > |For a relation in the database's defa

Re: pg_filenode_relation(0,0) elog

2021-06-12 Thread Justin Pryzby
On Fri, Jun 11, 2021 at 11:51:35PM -0400, Tom Lane wrote: > Justin Pryzby 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

Re: pg_filenode_relation(0,0) elog

2021-06-11 Thread Tom Lane
Justin Pryzby 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-c

pg_filenode_relation(0,0) elog

2021-06-11 Thread Justin Pryzby
Per sqlsmith. postgres=# SELECT pg_filenode_relation(0,0); ERROR: unexpected duplicate for tablespace 0, relfilenode 0 postgres=# \errverbose ERROR: XX000: unexpected duplicate for tablespace 0, relfilenode 0 LOCATION: RelidByRelfilenode, relfilenodemap.c:220 The usual expectation is that sq