Re: Patch for TNS services

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Mario Weilguni <mweilguni(at)sime(dot)com>
Cc: Postgres Hacker Lister <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch for TNS services
Date: 2000-08-31 14:43:48
Message-ID: 20000831094348.A11695@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-08-31 14:53:04 Re: AW: Backend-internal SPI operations
Previous Message Tom Lane 2000-08-31 14:37:20 Re: func() & select func()