Re: PyGreSQL bug

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Johnson <ajohnson(at)lynn(dot)ci-n(dot)com>
Cc: PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: PyGreSQL bug
Date: 2002-03-28 16:17:18
Message-ID: 200203281617.g2SGHIb08247@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Can someone on the interfaces list comment on this?

Andrew Johnson wrote:
> Not sure if you're the right person to be talking to here, but the recent
> CVS pacthes to the module belong to you, so here goes.
>
> pgdb.connect() seems to be broken on Python 2.0.1 (which ships with
> Slackware 8), and perhaps on other Pythons, haven't checked. Something in
> the _pg.connect() call isn't working. I think the problem stems from the
> fact that 'host' is a named parameter of both _pg.connect and pgdb.connect,
> and so Python treats it as a variable assignment, not a named parameter.
>
> In any case, rewriting the call without named parameters solved the problem.
>
> Instead of:
>
> cnx = _pg.connect(host = dbhost, dbname = dbbase, port = dbport,
> opt = dbopt, tty = dbtty,
> user = dbuser, passwd = dbpassw
>
> use:
>
> cnx = _pg.connect(dbbase, dbhost, dbport, dbopt,
> dbtty, dbuser, dbpasswd)
>
> --
> Andrew Johnson (ajohnson(at)lynn(dot)ci-n(dot)com)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Browse pgsql-interfaces by date

  From Date Subject
Next Message Paul M Foster 2002-03-31 22:15:50 Return value if table doesn't exist
Previous Message jacques.talbot 2002-03-27 19:58:15 Error compiling --with-tcl on AIX