Re: Clarification on pg_attribute attrelid

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Martin <redtux1(at)gmail(dot)com>
Cc: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Re: Clarification on pg_attribute attrelid
Date: 2020-09-11 14:12:44
Message-ID: 370678.1599833564@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mike Martin <redtux1(at)gmail(dot)com> writes:
> Is it correct that calling attrelid::regclass will always return a
> non-schema qualified relation name

No. regclassout will schema-qualify if the table isn't visible
according to the current search path.

I didn't check, but I think "not visible" would include the case
of "table is hidden by a temp table of the same name".

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Shaozhong SHI 2020-09-17 22:59:26 Postgres as a service for supporting common application users
Previous Message Mike Martin 2020-09-11 11:26:44 Clarification on pg_attribute attrelid