CREATE USER through SQL possible? - Mailing list pgsql-sql

From Adams, Joe
Subject CREATE USER through SQL possible?
Date
Msg-id ED7A447524CCD311A9BF009027DC86ED011417CC@NSEXCH02
Whole thread Raw
List pgsql-sql
I am trying to make a administration web page for postgreSQL users. The main
purpose of this web page is to add , remove and modify pgsql users. To do
this I am connecting to a database under the postgres user. The following is
some of the code being used.

$dataSource="dbi:Pg:dbname=alidb";
$dbh = DBI->connect($dataSource, "postgres", "password");
if($dbh)
{      $statement = "CREATE USER oadd WITH PASSWORD rspassword";      #prepare and execute the statment       $sth =
$dbh->prepare($statement);      $rc = $sth->execute;       print "USER HAS BEEN ADDED<br>$ADDstatement<br>";
 
}


Has anyone done this before? If so I could use some guidence because I can't
seem to get it working.

Joe Adams


pgsql-sql by date:

Previous
From: "Poul L. Christiansen"
Date:
Subject: Re: Continuous inserts...
Next
From: Joerg Hessdoerfer
Date:
Subject: ...