Re: Superuser log-in through a web interface? - Mailing list pgsql-general

From Kevin Barnard
Subject Re: Superuser log-in through a web interface?
Date
Msg-id b068057c0410302229259c985@mail.gmail.com
Whole thread Raw
In response to Superuser log-in through a web interface?  (Ken Tozier <kentozier@comcast.net>)
Responses Re: Superuser log-in through a web interface?  (Ken Tozier <kentozier@comcast.net>)
List pgsql-general
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 <kentozier@comcast.net> 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
>

pgsql-general by date:

Previous
From: Tim Vadnais
Date:
Subject: field incrementing in a PL/pgSQL trigger
Next
From: GreyGeek
Date:
Subject: Re: list fieldnames in table? (from PHP)