On Fri, Dec 21, 2018 at 05:58:43PM -0600, Justin Pryzby wrote:
> On Fri, Dec 14, 2018 at 11:11:03AM -0600, Justin Pryzby wrote:
> > I hacked query_formatted to accept an prepare=False.
> > The difficulty is in replacing %s with $1, which needs to either have a
> > list of
> > parameters over
On Fri, Dec 14, 2018 at 11:11:03AM -0600, Justin Pryzby wrote:
> Find attached patch with proof of concept for minimal implementation of
> prepared statements.
> And for PQexecPrepared, I added a conditional in query(), since that entire
> function appears to be exactly what's needed for the
On Fri, Dec 14, 2018 at 11:11:03AM -0600, Justin Pryzby wrote:
> Find attached patch with proof of concept for minimal implementation of
> prepared statements.
I was looking at what it would take to allow prepared statements in pgdb
module, in addition to pg. I guess that's most of what you were
Find attached patch with proof of concept for minimal implementation of
prepared statements.
I hacked query_formatted to accept an prepare=False.
The difficulty is in replacing %s with $1, which needs to either have a list of
parameters over which to iterate, or at least an integer determining
On 12/13/18 11:58 PM, Justin Pryzby wrote:
> The link to the archives is still dead:
> https://mail.vex.net/mailman/private.cgi/pygresql/
https://mail.vex.net/mailman/private/pygresql/
This is a bit more difficult because it happens inside Mailman. I tried
searching for an answer but couldn't
On Fri, Dec 14, 2018 at 04:31:00PM +0100, Christoph Zwerschke wrote:
> Am 14.12.2018 um 14:57 schrieb Justin Pryzby:
> > Maybe it's easier than that..
> > I saw two issues. First, EXECUTE %s wasn't "adapted" to $1 (since
> > there were no parameters passed).
> > Second, execute failed with
Am 14.12.2018 um 14:57 schrieb Justin Pryzby:
> Maybe it's easier than that..
> I saw two issues. First, EXECUTE %s wasn't "adapted" to $1 (since
> there were no parameters passed).
> Second, execute failed with inline=False.
> But actually, SQL EXECUTE doesn't accept parameters,
> they MUST be
On Sun, Dec 09, 2018 at 02:23:48PM -0600, Justin Pryzby wrote:
> >>> d.query('prepare c AS INSERT INTO t VALUES($1)') -- note postgres $1
> >>> parameter
>
> But this fails:
>
> >>> d.query_formatted('EXECUTE c(%s)', [1])
On Thu, Dec 13, 2018 at 10:46:15PM +0100, Christoph Zwerschke wrote:
>
Am 14.12.2018 um 01:55 schrieb Justin Pryzby:
> Do you have any idea what the interface would look like for this ?
> Would we add a prepare() and execute() ?
> Or query(..., prepare='name') ?
I'd prefer the former. We could then also add describe_prepared() and
delete_prepared() (which would
On Thu, Dec 13, 2018 at 11:49:38PM -0600, D'Arcy Cain wrote:
> On 12/13/18 4:10 PM, Christoph Zwerschke wrote:
> > Am 13.12.2018 um 23:03 schrieb Justin Pryzby:
> >> BTW, are the mailing list archives (still) public ? I can't find them and
> >> the
> >> link is dead.
> >
> > D'Arcy, can you
On 12/13/18 4:10 PM, Christoph Zwerschke wrote:
> Am 13.12.2018 um 23:03 schrieb Justin Pryzby:
>> BTW, are the mailing list archives (still) public ? I can't find them
>> and the
>> link is dead.
>
> D'Arcy, can you have a look? They're on your server.
On Thu, Dec 13, 2018 at 10:46:15PM +0100, Christoph Zwerschke wrote:
> unfortunately PyGres does not yet support prepared statements with parameter
> passing. I think this can only be solved by adding support for
> PQExecPrepared in the C module.
Do you have any idea what the interface would look
Am 13.12.2018 um 23:03 schrieb Justin Pryzby:
BTW, are the mailing list archives (still) public ? I can't find them and the
link is dead.
D'Arcy, can you have a look? They're on your server.
-- Christoph
___
PyGreSQL mailing list
PyGreSQL@vex.net
On Thu, Dec 13, 2018 at 10:46:15PM +0100, Christoph Zwerschke wrote:
> unfortunately PyGres does not yet support prepared statements with parameter
> passing. I think this can only be solved by adding support for
> PQExecPrepared in the C module.
Thank you.
BTW, are the mailing list archives
Hi Justin,
unfortunately PyGres does not yet support prepared statements with
parameter passing. I think this can only be solved by adding support for
PQExecPrepared in the C module.
I have now added a ticket for this:
http://trac.pygresql.org:8000/pgtracker/ticket/76
-- Christoph
Hi,
I've been wanting to implement prepared statements, not sure if that's
considered to be supported by pygresql.
I found that I can do:
>>> import pg
>>> d=pg.DB('ts')
>>> d.query('prepare c AS INSERT INTO t VALUES($1)') -- note postgres $1
>>> parameter
>>> d.query_formatted('EXECUTE c(1)')
16 matches
Mail list logo