Re: Patch for TNS services - Mailing list pgsql-hackers

From Ross J. Reedstrom
Subject Re: Patch for TNS services
Date
Msg-id 20000831094348.A11695@rice.edu
Whole thread Raw
In response to Patch for TNS services  (Mario Weilguni <mweilguni@sime.com>)
List pgsql-hackers
On Wed, Aug 30, 2000 at 08:04:33PM +0200, Mario Weilguni wrote:
> 
> Last week I created a patch for the Postgres client side libraries to allow 
> something like a (not so mighty) form of Oracle TNS, but nobody showed any 
> interest. Currently, the patch is not perfect yet, but works fine for us. I 
> want to avoid improving the patch if there is no interest in it, so if you 
> think it might be a worthy improvement please drop me a line.
> 
> It works like this:
> The patch allows to supply another parameter to the Postgres connect string, 
> called "service". So, instead of having a connect string (e.g. in PHP) like 
> "dbname=foo host=bar port=5433 user=foouser password=barpass"
> the string would be
> "service=stupid_name_here"
> or more often
> "service=stupid_name_here user=foouser password=barpass"
> 
> There's a config file /etc/pg_service.conf, having an entry like:
> [stupid_name_here]
> dbname=foo
> host=bar
> port=5433
> ....
> 

Looks kind of like a server side ODBC datasource.  Looks useful
to me. I've mainly been using ColdFusion to connect my webpages to
postgresql, via ODBC, and I can attest to the utility of just changing
the host or dbname in the one source being referenced by all that code.
Having it server side, so other interfaces can use the same setup,
would be nice.

Are any of the parameters from your service overrideable? i.e. can it
be used to store defaults, say for username?

Ross
-- 
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: AW: Backend-internal SPI operations
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: AW: Backend-internal SPI operations