Implementing programatic access to a database using dblink?

From: Adam Witney <awitney(at)sgul(dot)ac(dot)uk>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Implementing programatic access to a database using dblink?
Date: 2008-12-12 12:16:45
Message-ID: 44D873EA-F2CA-4E30-998B-FCEC9C4E785D@sgul.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

Our database (8.2.6) runs on a separate machine from the web
interface. Each user has their own username/password and row level
security is handled by a set of views on top of the base tables.

I'd like to provide programatic access to my database (I have been
looking at Perl's DBIx::Class), but I want to control which tables/
views can be queried via this route. I thought of creating a second
database with views wrapping dblink queries to the main database. The
problem is that the dblink query needs to send a password even after
the user has been authenticated against the first. Is there a way to
get this to work or to get around this?

Maybe on a more general note i wonder if those with more experience
than me knows, does this approach sound like complete madness or are
there better ways to approach this?

thanks for any help

Adam

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2008-12-12 12:25:07 Re: create table as vs. create table like
Previous Message Ivan Sergio Borgonovo 2008-12-12 12:02:29 create table as vs. create table like