createuser ignores stdin in 8.1.0?

From: Gary Horton <Gary(dot)Horton(at)Sun(dot)COM>
To: pgsql-general(at)postgresql(dot)org
Subject: createuser ignores stdin in 8.1.0?
Date: 2005-12-02 18:08:40
Message-ID: 43908DA8.5050708@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We're migrating from 7.3.4 to 8.1.0, and I'm seeing different behavior
with the createuser command. What we are wanting is to streamline our
product installs, to require minimal user interaction, so we basically
embed the password like this in our bourne-shell wrapper script:

$POSTGRESQL_HOME/bin/createuser -d -P $PGUSER <<END
$PGPASSWORD
$PGPASSWORD
END

...and in 7.3.4, this works just fine, with the shell consuming the
stdin and redirecting it to the createuser command, which subsequently
doesn't bother the user with the prompt (i.e. the prompts are responded
to automatically). However, this doesn't work at all in 8.1.0 --
regardless of the stdin redirection, the createuser program appears to
ignore the stdin information and insists on prompting for the input
instead.

Is this a known expected behavior? Do we have a workaround to get this
to behave automatically like it did for 7.3.4?

Thanks so much for anyone's insights. And, if you would be so kind,
please cc me at my email since I'm not signed up to receive
interest-list messages...

-Gary Horton

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-12-02 18:21:05 Re: Numeric 508 datatype
Previous Message Bruce Momjian 2005-12-02 18:03:26 Re: Numeric 508 datatype