Re: [GENERAL] How to list current user and database in PSQL

2013-12-31 Thread bricklen
On Tue, Dec 31, 2013 at 10:55 AM, peterlen wrote: > After logging into the PSQL Shell Script as a particular user and > database, I > want to display who my current user is and what database I am in as I may > have forgotten who I am logged in as in order to make sure any commands are > going to

Re: [GENERAL] How to list current user and database in PSQL

2013-12-31 Thread peterlen
Excellent. That works. Many thanks! -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-list-current-user-and-database-in-PSQL-tp5784928p5784932.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (p

Re: [GENERAL] How to list current user and database in PSQL

2013-12-31 Thread Bosco Rama
On 12/31/13 11:06, Bosco Rama wrote: > > Use the connect meta without arguments, i.e. > > xyz> \c > You are now connected to database "xyz" as user "demo". Hmmm. Scratch that. That actually does a reconnect. Probably not what you want, especially is you are in the middle of a transaction. :-(

Re: [GENERAL] How to list current user and database in PSQL

2013-12-31 Thread Bosco Rama
On 12/31/13 10:55, peterlen wrote: > After logging into the PSQL Shell Script as a particular user and database, I > want to display who my current user is and what database I am in as I may > have forgotten who I am logged in as in order to make sure any commands are > going to the right place. I

Re: [GENERAL] How to list current user and database in PSQL

2013-12-31 Thread Adrian Klaver
On 12/31/2013 10:55 AM, peterlen wrote: After logging into the PSQL Shell Script as a particular user and database, I want to display who my current user is and what database I am in as I may have forgotten who I am logged in as in order to make sure any commands are going to the right place. In

[GENERAL] How to list current user and database in PSQL

2013-12-31 Thread peterlen
After logging into the PSQL Shell Script as a particular user and database, I want to display who my current user is and what database I am in as I may have forgotten who I am logged in as in order to make sure any commands are going to the right place. In Oracle's SQLPlus you can do something lik