X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 98B6DD1B196 for ; Fri, 2 Jul 2004 20:32:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29125-09 for ; Fri, 2 Jul 2004 23:32:31 +0000 (GMT) Received: from biglumber.com (biglumber.com [207.228.252.42]) by svr1.postgresql.org (Postfix) with SMTP id E5DD9D1B29D for ; Fri, 2 Jul 2004 20:32:26 -0300 (ADT) Received: (qmail 26979 invoked from network); 2 Jul 2004 23:32:30 -0000 Received: from unknown (HELO localhost) (207.228.252.42) by 0 with SMTP; 2 Jul 2004 23:32:30 -0000 From: "Greg Sabino Mullane" To: pgsql-interfaces@postgresql.org Cc: dbdpg-general@postgresql.org Cc: dbdpg-general@postgresql.org Subject: Re: DBD::Pg and $sth->{ParamValues} X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <878ye2c2bv.fsf@openinformatics.com> Date: Fri, 2 Jul 2004 23:32:30 -0000 X-Mailer: JoyMail 1.48 Message-ID: <8419477399a5ea6e29452fbf21676c76@biglumber.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/9 X-Sequence-Number: 5015 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > What is the status of the this attribute? I would like to help > implement the code (since I need it for my application). Feel free to jump in. I'm pretty sure it is unsupported at the moment. > But I'm a bit confused about what the status of prepared statements is > in the code. I'm assuming the the dbd_st_execute() in dbdimp.c is the > latest code used and that prescan_stmt.c isn't being used. That is correct. > paramValues = calloc(imp_sth->numphs, sizeof(*paramValues)); > > but it is never freed, isn't that a memory leak? Yes, probably so. I don't like the use of calloc anyway, so if you can find a way to use New() in a loop instead, I'd go that way. Feel free to strip out the 'y' and 'z' ints as well, looks like those are leftover debugging aids. > this because in order to make the ParamValues attribute work, I'll > need to make that array part of the statement handle - and I don't > want to be keeping track of memory that is going to vanish out from > underneath me. Upon looking at the code again, I think everything you need is already there, inside of imp_sth->seg->value. But getting rid of that calloc would still be nice. :) - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200407021933 -----BEGIN PGP SIGNATURE----- iD8DBQFA5fDvvJuQZxSWSsgRAqR7AKCbp97sb/Y1plTdJ0ucTOiNy2EXgACfQmzE +X0SUFg+ImHdyUAobivwPoI= =iCjA -----END PGP SIGNATURE-----