Re: DELETE...RETURNING problem with libpq - Mailing list pgsql-sql

From Brice André
Subject Re: DELETE...RETURNING problem with libpq
Date
Msg-id CAOBG12ms=mgLFaR7BD7s7LckCtcT7dSYX2bUYd2A2wOGN8LaiQ@mail.gmail.com
Whole thread Raw
In response to Re: DELETE...RETURNING problem with libpq  (Wolfe Whalen <wolfe@quios.net>)
Responses Re: DELETE...RETURNING problem with libpq  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-sql
Hi Wolfe,

First, thanks for your help.

I tried your code, but it does not work... the function returns a string : "0". When I check, this command properly modifies one row, as expected.

I don't know if it may help, but just in case... The DELETE operation is not performed on a table : it is performed on a view. I have a rule on that view that, instead of performing a delete on the corresponding table, performs an update with table entry tagged as deleted (in a dedicated column of the table). This code (sql part) works for years and, when executing this command by other ways (php and pgadmin), it deletes and returns expected data. With libpq, it deletes, but does not return anything.


Regards,
Brice

pgsql-sql by date:

Previous
From: Wolfe Whalen
Date:
Subject: Re: DELETE...RETURNING problem with libpq
Next
From: JORGE MALDONADO
Date:
Subject: Advice on re-writing a SELECT query.