Re: BUG #16195: current_schema always return "public" - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #16195: current_schema always return "public"
Date
Msg-id 20200109041521.GH2251@paquier.xyz
Whole thread Raw
In response to BUG #16195: current_schema always return "public"  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Tue, Jan 07, 2020 at 04:06:05PM +0000, PG Bug reporting form wrote:
> Context:
> user "test" and schema "test" created on my DB.
>
> Connencted as test user on my DB:
> SHOW search_path -> "$user", public
> SELECT current_schema -> public
>
> Expectation -> SELECT current_schema -> test

With a database role named test:
=# show search_path ;
   search_path
-----------------
 "$user", public
(1 row)
=# select current_schema();
 current_schema
----------------
 public
(1 row)
=# create schema test;
CREATE SCHEMA
=# select current_schema();
 current_schema
----------------
 test
(1 row)

So your expectation is right, but not your test.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: REINDEX CONCURRENTLY unexpectedly fails
Next
From: Michael Paquier
Date:
Subject: Re: libpq parameter parsing problem