Re: Embedding postgresql in my application

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Murray Cumming <murrayc(at)murrayc(dot)com>
Cc: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>, pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Embedding postgresql in my application
Date: 2006-12-19 15:46:54
Message-ID: 20061219154654.GA3036@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Murray Cumming wrote:

> On Sat, 2006-12-16 at 13:16 +0700, Jeroen T. Vermeulen wrote:
> > f your application
> > can run under many different user identities and each should have its
> > own
> > database user, use "ident sameuser"
>
> I believe that ident authentication requires an additional service such
> as gidentd. Well, I think that's been my experience in the past.

Sure.

> > and create a database user for every
> > system user when that user first runs the application:
> >
> > createuser -h "$DBDIR/data" \
> > --no-superuser \
> > --no-createrole \
> > --no-createdb \
> > $USERNAME
>
> createuser asks for a password on stdin. Do you know of any way to
> specifify an initial superuser and password for a new database cluster
> without doing it via stdin? That doesn't seem like a stable API that I
> should rely on.

Sure, initdb accepts the -U parameter to specify the user and you can
put the password in a temp file and give it to initdb with --pwfile.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Carlo Stonebanks 2006-12-19 18:06:48 ODBC: how to change search_path in DSN?
Previous Message Murray Cumming 2006-12-19 15:36:53 Re: Embedding postgresql in my application