Re: Seems to be impossible to set a NULL search_path - Mailing list pgsql-general

From Rob Sargent
Subject Re: Seems to be impossible to set a NULL search_path
Date
Msg-id 8029d17a-edc0-2cc8-0ea5-a7e18791bc0d@gmail.com
Whole thread Raw
In response to Re: Seems to be impossible to set a NULL search_path  (Bryn Llewellyn <bryn@yugabyte.com>)
List pgsql-general
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.

pgsql-general by date:

Previous
From: Bryn Llewellyn
Date:
Subject: Re: Seems to be impossible to set a NULL search_path
Next
From: Bryn Llewellyn
Date:
Subject: Re: Seems to be impossible to set a NULL search_path