Re: [gnome-db] Re: gda-postgres: updatable data models
- From: Laurent Sansonetti <laurent datarescue be>
- To: Gonzalo Paniagua Javier <gonzalo gnome-db org>
- Cc: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Re: gda-postgres: updatable data models
- Date: Mon, 27 Oct 2003 18:04:30 +0000
On Mon, 2003-10-27 at 14:38, Gonzalo Paniagua Javier wrote:
> El sáb, 25-10-2003 a las 07:48, Laurent Sansonetti escribió:
> > I just realized that the previous patch was not in unified format :)
> +               const gchar *newval = gda_value_stringify (gda_row_get_value ((GdaRow *) row, colnum));
> 
> You have to g_free that one after using it.
> 
True.
> 
> +               /* build the update command */
> +               query = g_strdup_printf ("UPDATE %s ", priv_data->table_name);
> 
> You will leak that one.
> 
I don't get this one.  I g_free (query) a few lines after that.
Are you talking about priv_data->table_name?  In this case, yes, it's
not freed, since it's allocated in the new() method of the record set,
and I couldn't see any according free() method.
> +            if (pg_upd_res != NULL) {
> +                    /* update ok! */
> +                     if (PQresultStatus (pg_upd_res) == PGRES_COMMAND_OK)
> +                            status = TRUE;
> +                    else
> +                            gda_connection_add_error (priv_data->cnc,
> +                                                      gda_postgres_make_error (pg_conn, pg_res));
> 
> That one should be pg_upd_res
Yep ;)
Please comment the second point, and I will provide an other patch (this
time with a ChangeLog entry :p).
Thanks,
-- 
{ "Laurent" => "http://lrz.samika.net" }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]