Re: Sending several commands simultaneously to PostgreSQL 8.4

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Sending several commands simultaneously to PostgreSQL 8.4
Date: 2013-01-21 14:27:07
Message-ID: CAADeyWgLeJZHrR7DLmGJ5k6h6NQJoEgJn-koFrQ_EOhL+W6m-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

To make my question more concrete:
if I'd like to round-robin 6 PostgreSQL connections
from my Perl script - how should I change my code:

eval {
my $dbh = DBI->connect_cached(DSN, DBUSER, DBPASS, {
AutoCommit => 1,
PrintWarn => 1,
PrintError => 1,
RaiseError => 1,
FetchHashKeyName => 'NAME_lc',
pg_enable_utf8 => 1
});
..........SQL commands.......
};
warn $@ if $@;
}

I.e. I don't understand how to combine
this with the DBI connect_cached() call?

How to make it return different connections?

Thanks
Alex

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2013-01-21 14:45:27 Re: Sending several commands simultaneously to PostgreSQL 8.4
Previous Message Chris Ernst 2013-01-21 14:19:53 Re: pg_Restore