[gnome-db] Issue with postgresql provider (3.0.2)



I have an issue with libgda, specifically the postgresql provider.

I basically create a GdaQuery with text "INSERT INTO <some-table> VALUES(<some values)".

When I call gda_query_execute( query, ..., &error ), the error is filled in with a GDA_QUERY_EXEC_ERROR with the text "INSERT 0 1". This doesn't happen with sqlite or mysql. The postgres provider specifically generates an event in compute_retval_from_pg_res() when the status is PGRES_COMMAND_OK. gda_query_execute() then compares the events before and after, and because there is this new event, it is copied via g_set_error().

The same happens when my query is "DELETE FROM <some-table> WHERE <some-condition>", but the error string is "DELETE 0" (or maybe "DELETE n" when n rows are deleted).

Is this a bug in libgda, or is this expected behaviour? Should I be testing the returned error to see if it begins with "INSERT" or "DELETE" and ignore it? Should I clear the connection events, execute the query, then look at the events myself and ignore the returned error (the event has type GDA_EVENT_NOTICE or something like that)?

Phil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]