Re: DELETE...RETURNING problem with libpq

Поиск
Список
Период
Сортировка
От Brice André
Тема Re: DELETE...RETURNING problem with libpq
Дата
Msg-id CAOBG12ms=mgLFaR7BD7s7LckCtcT7dSYX2bUYd2A2wOGN8LaiQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: DELETE...RETURNING problem with libpq  (Wolfe Whalen <wolfe@quios.net>)
Ответы Re: DELETE...RETURNING problem with libpq  (Guillaume Lelarge <guillaume@lelarge.info>)
Список 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 по дате отправления:

Предыдущее
От: Wolfe Whalen
Дата:
Сообщение: Re: DELETE...RETURNING problem with libpq
Следующее
От: JORGE MALDONADO
Дата:
Сообщение: Advice on re-writing a SELECT query.