Re: libpq and prepared statements progress for 8.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Wheeler <david(at)kineticode(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Rudy Lippan <rlippan(at)remotelinux(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Greg Sabino Mullane <greg(at)turnstep(dot)com>
Subject: Re: libpq and prepared statements progress for 8.0
Date: 2004-09-17 20:32:50
Message-ID: 24492.1095453170@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

David Wheeler <david(at)kineticode(dot)com> writes:
> To get initial PREPARE support, I don't think that the other DBD::Pg
> developers mind sending strings to the PostgreSQL server in a SQL
> PREPARE statement.

> The question, in my mind, is it currently possible to do this without
> specifying the type of every placeholder?

Well, that's the problem: you can't. The SQL PREPARE command doesn't
have any provision for dealing with unspecified parameters. I think
this is reasonable since if it could, it would still have no way to tell
you what it resolved the parameter types as. The shortcoming here is
really in libpq and not in the backend: the protocol-level Parse
operation *is* designed to handle this scenario, but libpq isn't letting
you get at it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Wheeler 2004-09-17 20:50:09 Re: libpq and prepared statements progress for 8.0
Previous Message Marc Colosimo 2004-09-17 20:26:47 Re: tweaking MemSet() performance - 7.4.5

Browse pgsql-patches by date

  From Date Subject
Next Message David Wheeler 2004-09-17 20:50:09 Re: libpq and prepared statements progress for 8.0
Previous Message David Wheeler 2004-09-17 20:15:28 Re: libpq and prepared statements progress for 8.0