problem creating users via pythons script

From: Timothy Smith <timothy(at)open-networks(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: problem creating users via pythons script
Date: 2006-07-19 12:02:13
Message-ID: 44BE1F45.7060403@open-networks.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

this is really newb of me but i can't manage to make a script to create
users.

cur.execute("""CREATE USER %s WITH PASSWORD %s IN GROUP %s
""",(StaffUserName,NewPassword,StaffGroup))

produces this error

ERROR: syntax error at or near "'bob.smith'" at character 13

is it because i need to double quote or something? i'm sure the answer
is stupid and i'm just too tired.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christian Rengstl 2006-07-19 12:03:31 Re: Performance problem with query
Previous Message Q 2006-07-19 11:52:20 Re: Performance problem with query