Re: Request assistance connecting with Pg::connectdb

Поиск
Список
Период
Сортировка
От Nigel J. Andrews
Тема Re: Request assistance connecting with Pg::connectdb
Дата
Msg-id Pine.LNX.4.21.0211212207080.668-100000@ponder.fairway2k.co.uk
обсуждение исходный текст
Ответ на Re: Request assistance connecting with Pg::connectdb  (Medi Montaseri <medi.montaseri@intransa.com>)
Список pgsql-general
On Thu, 21 Nov 2002, Medi Montaseri wrote:

> While I don't have a solution for you, I'd recommend using DBI.
>
> Wright, Ryan P wrote:
>
> >Hello,
> >
> >I am having a heck of a time connecting to my postgres server, and was
> >hoping some kind soul would advise me on how to proceed.
> >
> >The problem: Perl script dies with no error message.
> >
> >Code snippet:
> >
> >$conn = Pg::connectdb("dbname=testdb host=localhost port=5432 user=postgres
> >password=test");
> >print "status = ",$conn->status, "\n";
> >die $conn->errorMessage unless PGRES_CONNECTION_OK eq $conn->status;

i think you want that test to read:

$conn->status == PGRES_CONNECTION_OK

You're getting the string equality test mixed up with another languages numeric
one. Or do I mean that the other way around


--
Nigel Andrews



В списке pgsql-general по дате отправления:

Предыдущее
От: "Gregory Wood"
Дата:
Сообщение: Re: PostgreSQL compilation with custom table name length
Следующее
От: "Wright, Ryan P"
Дата:
Сообщение: Re: Request assistance connecting with Pg::connectdb