Jane Ren wrote:
> Hi,
>
> I need to write a script that creates a new user with a password
> automatically.
>
> Is there a way I can specify the password as a command line argument to
> createuser?
>
Since you have access to the shell use psql -U user -c "create role ..."
Joshua D. Drake
> It looks like postgres does not read from stdin, but from /dev/tty.
>
> Thanks
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org/
>