pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Wheeler <david@wheeler.net>
Cc: dbi-dev@perl.org
Cc: pgsql-interfaces@postgresql.org
Subject: Re: DBD::PostgreSQL
Date: Mon, 18 Nov 2002 11:19:25 -0500
Message-ID: <29660.1037636365@sss.pgh.pa.us> (raw)
In-Reply-To: <0907BA9A-FB11-11D6-93B3-0003931A964A@wheeler.net>
References: <0907BA9A-FB11-11D6-93B3-0003931A964A@wheeler.net>

David Wheeler <david@wheeler.net> writes:
> 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.

I think someone else said that the DBD framework already includes such a
flag ("BegunWork"?) --- if so, you should surely use that one.

> So, if I understand you correctly, PostgreSQL's PREPARE statement 
> *requires* data typing in its syntax?

Yup.

> 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?

There are various ways to retrieve the datatypes of the columns of a
table, but I'm not sure how that helps you to determine the parameter
types for an arbitrary SQL command to be prepared.  Are you assuming
a specific structure of the command you want to prepare?

			regards, tom lane



view thread (35+ messages)  latest in thread

Message-ID: <29660.1037636365@sss.pgh.pa.us>
Permalink:  ../29660.1037636365@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29660.1037636365@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david@wheeler.net, dbi-dev@perl.org
  Subject: Re: DBD::PostgreSQL
  In-Reply-To: <29660.1037636365@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox