CREATE USER through SQL possible?

From: "Adams, Joe" <jadams1(at)mtt(dot)ca>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: CREATE USER through SQL possible?
Date: 2000-08-17 15:20:25
Message-ID: ED7A447524CCD311A9BF009027DC86ED011417CC@NSEXCH02
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-sql by date

  From Date Subject
Next Message Joerg Hessdoerfer 2000-08-17 15:30:24
Previous Message Poul L. Christiansen 2000-08-17 14:50:00 Re: Continuous inserts...