Clarification on pg_attribute attrelid - Mailing list pgsql-sql

From Mike Martin
Subject Clarification on pg_attribute attrelid
Date
Msg-id CAOwYNKYJ-MkzvEbfnHGFpYEisZUz6iE4-md3z5b0ZPV-7dZ_1w@mail.gmail.com
Whole thread Raw
Responses Re: Clarification on pg_attribute attrelid  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Is it correct that calling attrelid::regclass will always return a non-schema qualified relation name
ie:
WHERE there is a temp table and a permanent table of the the same name
SELECT attrelid::regclass
FROM pg_attribute
WHERE attrelid = 'tagdata'::regclass

will always use the "current" temp table of the name or the permanent table  if no temp table exists without schema qualification.

So this would be the same as a normal select , ie:uses temp table/permanent table as appropriate

thanks

Mike

pgsql-sql by date:

Previous
From: Iuri Sampaio
Date:
Subject: Re: Crossing/Rotating table rows to rows and columns
Next
From: Tom Lane
Date:
Subject: Re: Clarification on pg_attribute attrelid