Re: Embedded App and User Authentication

From: "Jeffrey J(dot) Early" <jearly(at)alum(dot)ups(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Embedded App and User Authentication
Date: 2006-08-31 16:38:35
Message-ID: C11C5E9B.10F58%jearly@alum.ups.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

on 8/31/06 7:26 AM, Tom Lane at tgl(at)sss(dot)pgh(dot)pa(dot)us wrote:

> "Jeffrey J. Early" <jearly(at)alum(dot)ups(dot)edu> writes:
>> I have an embedded application on MacOS X that bundles the postgresql apps
>> and a database cluster with the OSX application, but am running into
>> troubles when trying to launch the application under different usernames.
>
>> In particular, if I create a database with 'initdb' under a username user1,
>> I can launch postmaster pointing to that database cluster on any system I'm
>> logged into with the username user1. However, as soon as I move to a system
>> where I'm logged in as user2, postmaster will fail to launch with the error
>> message "FATAL: role "user2" does not exist" .
>
> You really need to redo the initdb on each installed system anyway,
> so my advice is "don't do it that way".
>
> PG isn't designed to be used as an embedded database. Perhaps you'd be
> better off with SQLite?
>
> regards, tom lane

I would love to use SQLite, but unfortunately I need PostGIS functionality
for geometric data types and spatial indexing. I've explored all the other
options I could find and it seems like it has to be PostgreSQL. I'll take
other solutions if you think there are some.

Given that it looks like I'm stuck with PostgreSQL, do you know any way
around this authentication.

Picking up a database cluster and moving it from system to system *does*
seem to work without a hitch as long as the username is the same on each
system. So it seems to me there has to be a fairly simple solution to make
this work.

Thanks,
Jeffrey

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-08-31 16:56:37 Re: pg_dump: schema with OID 16396 does not exist
Previous Message Scott Marlowe 2006-08-31 16:02:54 Re: problem with initlocation