How do create a user with a bashscript

From: "A B" <gentosaker(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: How do create a user with a bashscript
Date: 2008-09-19 07:11:45
Message-ID: dbbf25900809190011v79ecec19rc142f14e991441b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi.
I want to create a user with the createuser command and supply the
password at the command line in a script, like this

#!/bin/bash
createuser myuser

but I want to supply a password on the command line, is that possible?
The docs tells me no, but does anyone know of a workaround?

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2008-09-19 07:55:16 Re: Moving data from one set of tables to another?
Previous Message G. J. Walsh 2008-09-19 02:14:42 scope of connection id (handler)