Re: Database Connect

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: webb sprague <wsprague(at)o1(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michaël Fiey <m(dot)fiey(at)futuresoundtech(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Database Connect
Date: 2001-04-20 17:52:23
Message-ID: Pine.LNX.4.30.0104201344570.5804-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 20 Apr 2001, webb sprague wrote:

> Aahh! I have a million Perl scripts that rely on this syntax in the DBI
> to connect to remote databases.
>
> like:
>
> $dbh=DBI->connect( "dbi:Pg:dbname=datab(at)remotehost",'wsprague','pass',
> {RaiseError => 1, AutoCommit => 1})
> or print STDERR "$DBI::errstr<p>";
>
> Umm, do you have any idea what we should do now?

perl -pie 's|@remotehost|;host=remotehost|g' <file>

Or something to that effect :-)

-- Brett
http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Women in love consist of a little sighing, a little crying, a little dying
-- and a good deal of lying.
-- Ansey

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Yampolsky 2001-04-20 18:01:45 Re: How to configure iodbc access to local postgres db?
Previous Message Vilson farias 2001-04-20 17:49:30 Re: very slow execution of stored procedures