Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C02FC9F9FE1 for ; Tue, 19 Dec 2006 11:47:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 28726-07 for ; Tue, 19 Dec 2006 11:46:59 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id BDA459F9357 for ; Tue, 19 Dec 2006 11:46:58 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-100-202.bk7-dsl.surnet.cl [200.126.100.202]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id kBJFkvLt015031; Tue, 19 Dec 2006 07:46:58 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E713A329FF; Tue, 19 Dec 2006 12:46:54 -0300 (CLST) Date: Tue, 19 Dec 2006 12:46:54 -0300 From: Alvaro Herrera To: Murray Cumming Cc: "Jeroen T. Vermeulen" , pgsql-interfaces Subject: Re: Embedding postgresql in my application Message-ID: <20061219154654.GA3036@alvh.no-ip.org> Mail-Followup-To: Murray Cumming , "Jeroen T. Vermeulen" , pgsql-interfaces References: <1166225144.12609.2.camel@localhost.localdomain> <20058.125.24.243.222.1166249768.squirrel@webmail.xs4all.nl> <1166542613.20613.19.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1166542613.20613.19.camel@localhost.localdomain> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 19 Dec 2006 07:46:58 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/18 X-Sequence-Number: 6352 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