Re: Superuser log-in through a web interface?

From: Kevin Barnard <kevin(dot)barnard(at)gmail(dot)com>
To: Ken Tozier <kentozier(at)comcast(dot)net>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Superuser log-in through a web interface?
Date: 2004-10-31 05:29:47
Message-ID: b068057c0410302229259c985@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)comcast(dot)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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Claudio Duffini 2004-10-31 08:10:29 Re: Upgrading from beta3 to beta4
Previous Message Oleg Bartunov 2004-10-31 04:29:21 Re: Question about ltree....