can't connect, strange error
Can someone tell me what is going on. Below is a sample of
my interactive command line output inside postgres. I can't
install 7.0.2 on my current linux machine. I installed the
same version fine on two other linux machines.
//------------------------------------------------------------------------------
jgreer=# \l
List of databases
Database | Owner
-----------+----------
jgreer | postgres
postgres | postgres
root | postgres
singlesc | root
template1 | postgres
(5 rows)
jgreer=# create database x;
CREATE DATABASE
jgreer=# \connect x;
FATAL 1: Database "x;" does not exist in the system
catalog.
Previous connection kept
jgreer=#
//------------------------------------------------------------------------------
Here is how I do my install which has always worked.
//------------------------------------------------------------------------------
(untar ungzip source)
(cd to <postgres src dir>/src/)
./configure
gmake
gmake install
add this the .bashrc for postgres
PATH=".":/usr/local/pgsql/bin:$PATH
MANPATH=$MANPATH:/usr/local/pgsql/man
PGLIB=/usr/local/pgsql/lib
PGDATA=/usr/local/pgsql/data
export PATH MANPATH PGLIB PGDATA
(Edit file /etc/ld.so.conf to add a line
/usr/local/pgsql/lib)
( run command /sbin/ldconfig.)
mkdir /usr/local/pgsql/data
chown postgres:postgres /usr/local/pgsql/data
su postgres
initdb
/usr/local/pgsql/bin/postmaster -i &
createdb
# do this for each user
createuser jgreer # should pull up user id
from
/etc/passwd
createdb jgreer
# add this to /etc/rc.d/rc.local
su postgres -c "/usr/local/pgsql/bin/postmaster -i
-D
/usr/local/pgsql/data"
//------------------------------------------------------------------------------
Thanks
--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony
Quoting Jeff <cleaner@showmethenet.com>:
[snip]
jgreer=# \connect x;
FATAL 1: Database "x;" does not exist in the system
catalog.
the \ commands are internal to psql not the backend and don't use ;
Peter
--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/
Try:
\connect x
Without the ';'.
It looks like it is looking for a database named 'x;'.
HTH,
Colin
Show quoted text
-----Original Message-----
From: Jeff [mailto:cleaner@showmethenet.com]
Sent: Wednesday, January 31, 2001 8:21 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] can't connect, strange errorCan someone tell me what is going on. Below is a sample of
my interactive command line output inside postgres. I can't
install 7.0.2 on my current linux machine. I installed the
same version fine on two other linux machines.//------------------------------------------------------------
------------------jgreer=# \l
List of databases
Database | Owner
-----------+----------
jgreer | postgres
postgres | postgres
root | postgres
singlesc | root
template1 | postgres
(5 rows)jgreer=# create database x;
CREATE DATABASE
jgreer=# \connect x;
FATAL 1: Database "x;" does not exist in the system
catalog.
Previous connection kept
jgreer=#//------------------------------------------------------------
------------------Here is how I do my install which has always worked.
//------------------------------------------------------------
------------------(untar ungzip source)
(cd to <postgres src dir>/src/)
./configuregmake
gmake installadd this the .bashrc for postgres
PATH=".":/usr/local/pgsql/bin:$PATH
MANPATH=$MANPATH:/usr/local/pgsql/man
PGLIB=/usr/local/pgsql/lib
PGDATA=/usr/local/pgsql/data
export PATH MANPATH PGLIB PGDATA(Edit file /etc/ld.so.conf to add a line
/usr/local/pgsql/lib)
( run command /sbin/ldconfig.)mkdir /usr/local/pgsql/data
chown postgres:postgres /usr/local/pgsql/data
su postgresinitdb
/usr/local/pgsql/bin/postmaster -i &
createdb# do this for each user
createuser jgreer # should pull up user id
from
/etc/passwd
createdb jgreer# add this to /etc/rc.d/rc.local
su postgres -c "/usr/local/pgsql/bin/postmaster -i
-D
/usr/local/pgsql/data"//------------------------------------------------------------
------------------Thanks
--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony
Import Notes
Resolved by subject fallback
Thanks,
It is still strange though that I get different behavior
from the exact same source when built on two different
computers. I installed 7.0.2 on my laptop and I get an
interactive prompt ">". On my linux box I installed 7.0.2
and I get a "#" as the last character in the psql prompt.
The latter does not discard semi-colons after the prompt.
PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc
egcs-2.91.66
PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc
egcs-2.91.66
Peter T Mount wrote:
Quoting Jeff <cleaner@showmethenet.com>:
[snip]
jgreer=# \connect x;
FATAL 1: Database "x;" does not exist in the system
catalog.the \ commands are internal to psql not the backend and don't use ;
--
Jeff Greer
cleaner(at)showmethenet.com
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony
Jeff wrote:
It is still strange though that I get different behavior
from the exact same source when built on two different
computers. I installed 7.0.2 on my laptop and I get an
interactive prompt ">". On my linux box I installed 7.0.2
and I get a "#" as the last character in the psql prompt.
# indicates that you have superuser privilege, > that you don't:
template1=# \c - ruth
You are now connected as new user ruth.
template1=> \q
So, on your laptop, you are using psql as a user who has not got superuser
privilege.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And be not conformed to this world; but be ye
transformed by the renewing of your mind, that ye may
prove what is that good, and acceptable, and perfect,
will of God." Romans 12:2
Import Notes
Reply to msg id not found: MessagefromJeffjeffmail@showmethenet.comofWed31Jan2001214612MST.3A78EA14.46F74F92@showmethenet.com | Resolved by subject fallback