minor issue: \c without parameter disconnect current user

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: minor issue: \c without parameter disconnect current user
Date: 2016-10-17 04:49:46
Message-ID: CAFj8pRAaAap-KdYujD6GsEpSrbyEL=VLic3b2P9CkkXbaKYA=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I expect so \c without parameters has only informational character. But \c
reset user.

postgres=# set role to tom;
SET
Time: 0.787 ms
postgres=> select current_user;
+--------------+
| current_user |
+--------------+
| tom |
+--------------+
(1 row)

Time: 0.851 ms
postgres=> \c
You are now connected to database "postgres" as user "pavel".
postgres=# select current_user;
+--------------+
| current_user |
+--------------+
| pavel |
+--------------+
(1 row)

Regards

Pavel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2016-10-17 05:23:28 Re: Parallel bitmap heap scan
Previous Message Kouhei Kaigai 2016-10-17 02:39:14 Re: Steps inside ExecEndGather