On 7/6/22 14:47, Bryn Llewellyn wrote:
The problem was my stupid typo: writing « set search_path = 'pg_catalog, pg_temp'; » when I should *not* have typed those single quotes. Now the demo that I'd intended gets the outcome that I'd expected:

*select count(*) from pg_class; --------------<< 399
create temporary table pg_class(k int);
select count(*) from pg_class; --------------<<   0
set search_path = pg_catalog, pg_temp;
select count(*) from pg_class; --------------<< 400
*
There's no surprise here.  you read the system catalogue, made a table in whatever is the current schema which hid system's table, then hid your table by the new path.

Reply via email to