minor issue with psql keeping connections

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: minor issue with psql keeping connections
Date: 2004-10-31 15:16:08
Message-ID: 200410311016.08924.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


pgsql running on port 5480, connect to template1 as non-superuser "phppgadmin"
who does not have createdb privileges. attempt to run a script that creates a
database "phppgadmin" and then do a \connect to that database. this fails
(as it should) but when it does, it loses the connection to template1, and i
am not able to reconnect to any database, i think because it is looking on
port 5432 rather than the 5480 i specified when i originally connected.

postgres(at)phppgadmin:/usr/local/pgsql-8.0.0beta-4/bin$ ./psql -p5480 template1
-U phppgadmin
Welcome to psql 8.0.0beta4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

template1=> select version();
version
--------------------------------------------------------------------
PostgreSQL 8.0.0beta4 on i586-pc-linux-gnu, compiled by GCC 2.95.3
(1 row)

template1=> \i /usr/local/apache/htdocs/phppgadmin3cvs/sql/reports-pgsql.sql
ERROR: permission denied to create database
psql:/usr/local/apache/htdocs/phppgadmin3cvs/sql/reports-pgsql.sql:7: ERROR:
permission denied to create database
FATAL: database "phppgadmin" does not exist
psql:/usr/local/apache/htdocs/phppgadmin3cvs/sql/reports-pgsql.sql:9:
\connect: FATAL: database "phppgadmin" does not exist
!> \c template1
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
!>
!>

relativily minor issue, but seems like it should either be able to retain the
connection when inside the script, or recall that it needs to connect on 5480
after failure.

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Treat 2004-10-31 15:29:36 Re: minor issue with psql keeping connections
Previous Message Markus Bertheau 2004-10-31 11:43:30 Re: Not a real bug, but an error