Re: DBD::PostgreSQL

From: David Wheeler <david(at)wheeler(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: dbi-dev(at)perl(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: DBD::PostgreSQL
Date: 2002-11-18 16:16:03
Message-ID: 0907BA9A-FB11-11D6-93B3-0003931A964A@wheeler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

On Sunday, November 17, 2002, at 10:15 PM, Tom Lane wrote:

> Both of these seem pretty bogus to me. Ideally the driver should not
> issue a "begin" until the application issues the first command of the
> new transaction. Otherwise you get into scenarios where idle
> connections are holding open transactions, and ain't nobody gonna be
> happy with that.

Okay. I think I'll use a flag in the driver to track when it's in a
transaction, and do the right thing in the begin and rollback functions.

> Probably not --- the SQL spec seems to think that the server can intuit
> appropriate datatypes for each parameter symbol. (Which I suppose may
> be true, in a datatype universe as impoverished as the spec's is;
> but it won't work for Postgres. Thus we have a nonstandard syntax for
> PREPARE.) So you'll probably have to do some driver-specific coding
> here.

So, if I understand you correctly, PostgreSQL's PREPARE statement
*requires* data typing in its syntax? If so, is there an
easy/straight-forward way to ask the server what the data types for
each column are before executing the PREPARE?

> No ideas about your other questions, but I hope the DBI folk can
> answer.

Thanks, yes, I'm getting some good responses.

> Go to it ;-)

Thanks Tom!

Regards,

David

--
David Wheeler AIM: dwTheory
david(at)wheeler(dot)net ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: Theory(at)jabber(dot)org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Curtis Faith 2002-11-18 16:16:56 Re: btree shrinking again
Previous Message Jason Tishler 2002-11-18 16:07:18 Re: [HACKERS] ipc-daemon

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2002-11-18 16:19:25 Re: DBD::PostgreSQL
Previous Message Jon Jensen 2002-11-18 14:47:56 Re: DBD::PostgreSQL