Skip site navigation (1) Skip section navigation (2)

DBD::Pg and $sth->{ParamValues}

From: jason_e_stewart(at)users(dot)sourceforge(dot)net
To: pgsql-interfaces(at)postgresql(dot)org
Cc: dbi-dev(at)perl(dot)org
Subject: DBD::Pg and $sth->{ParamValues}
Date: 2004-07-02 07:09:40
Message-ID: 878ye2c2bv.fsf@openinformatics.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hey,

What is the status of the this attribute? I would like to help
implement the code (since I need it for my application).

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.

I'm not a great C coder anymore so pardon my ignorance. From my
reading of the code, there is an array:

		const char **paramValues;

which is dynamically allocated:

		paramValues = calloc(imp_sth->numphs, sizeof(*paramValues));

but it is never freed, isn't that a memory leak? I'm wondering about
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.

Cheers,
jas.

Responses

pgsql-interfaces by date

Next:From: Murray CummingDate: 2004-07-02 20:15:54
Subject: Users API
Previous:From: Kathy SmithDate: 2004-07-01 23:30:40
Subject: Array data and the Perl DBI

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group