You have a conceptual error. When connecting you are connecting "to a database". With out the database you are not connecting to anything hence the failure.
Typically to do what you are trying to do you would connect to the database template1 unless a database is specified. If you have another DB you can connect to that and do your create commands there are well. On Sat, 30 Oct 2004 20:35:50 -0400, Ken Tozier <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm trying to create a php form for logging in to postgress with > different level passwords and my first test with a superuser isn't > working unless I specify a database name. I would like to allow > superusers to log in without specifying a database so they can create > new users, databases etc from a web interface. Does anyone see what I'm > doing wrong in the following example? > > Thanks for any help, > > Ken > > --------------------------------------------- > I defined a super user like so > > CREATE USER user_name CREATEUSER PASSWORD 'password' > > Try to log in through a web form like so: > > User: user_name > Password: password > > but the connection always fails unless I specify a database. > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match