Обсуждение: Re: Problem with accesing Oracle from plperlu functionwhen using remote pg client.

Поиск
Список
Период
Сортировка

Re: Problem with accesing Oracle from plperlu functionwhen using remote pg client.

От
Tom Lane
Дата:
Bruce Momjian <bruce@momjian.us> writes:
> I think any serious tools are now using pg_stat_activity.  I saw we make
> the change in 8.4 and just document it.  I wouldn't make the change for
> Oracle but rather for clarity.

I think this is a non-solution, because it fails to guarantee that the
process title contains nothing that will confuse Oracle.  As somebody
already pointed out, it's possible to have parens in a user or database
name ... and for that matter, how sure are we that parens are the only
trouble case?  You'll be potentially breaking scripts that work now,
in order to reduce but not eliminate the problem with Oracle.

IMHO the right fix is the one that was touched on upthread: have
DBI-Link temporarily install a plain-vanilla, punctuation-free process
title (eg, just "postgres") while starting an Oracle connection.
        regards, tom lane


Re: Problem with accesing Oracle from plperlu functionwhen using remote pg client.

От
Bruce Momjian
Дата:
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > I think any serious tools are now using pg_stat_activity.  I saw we make
> > the change in 8.4 and just document it.  I wouldn't make the change for
> > Oracle but rather for clarity.
> 
> I think this is a non-solution, because it fails to guarantee that the
> process title contains nothing that will confuse Oracle.  As somebody
> already pointed out, it's possible to have parens in a user or database
> name ... and for that matter, how sure are we that parens are the only
> trouble case?  You'll be potentially breaking scripts that work now,
> in order to reduce but not eliminate the problem with Oracle.
> 
> IMHO the right fix is the one that was touched on upthread: have
> DBI-Link temporarily install a plain-vanilla, punctuation-free process
> title (eg, just "postgres") while starting an Oracle connection.

I was suggesting the colon rather to be clearer, not as an Oracle
fix.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: Problem with accesing Oracle from plperlu functionwhen using remote pg client.

От
Tom Lane
Дата:
Bruce Momjian <bruce@momjian.us> writes:
> I was suggesting the colon rather to be clearer, not as an Oracle
> fix.

Well, we could certainly debate the change on its own merits, but
I'm not seeing that it's enough nicer to justify a risk of breaking
ps-watching scripts.
        regards, tom lane


Re: Problem with accesing Oracle from plperlu functionwhen using remote pg client.

От
Tom Lane
Дата:
I wrote:
> Well, we could certainly debate the change on its own merits, but
> I'm not seeing that it's enough nicer to justify a risk of breaking
> ps-watching scripts.

Also, on second thought: what about IPv6 addresses?  Colon doesn't
look like a very good idea at all if you suppose that what's in
front of it is IPv6.
        regards, tom lane


Re: Problem with accesing Oracle from plperlu functionwhen using remote pg client.

От
Peter Eisentraut
Дата:
On Tuesday 17 March 2009 05:29:48 Tom Lane wrote:
> I wrote:
> > Well, we could certainly debate the change on its own merits, but
> > I'm not seeing that it's enough nicer to justify a risk of breaking
> > ps-watching scripts.
>
> Also, on second thought: what about IPv6 addresses?  Colon doesn't
> look like a very good idea at all if you suppose that what's in
> front of it is IPv6.

In that case standard URL formats put [] around the IP address.  People will 
forever hate the IPv6 designers for that, but it's standard and widespread 
now.