| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: transaction problem using cursors |
| Дата | |
| Msg-id | 20070611134058.GC25296@svana.org обсуждение исходный текст |
| Ответ на | Re: transaction problem using cursors ("Pit M." <fmi-soft@gmx.de>) |
| Ответы |
Re: transaction problem using cursors
|
| Список | pgsql-general |
On Mon, Jun 11, 2007 at 03:28:22PM +0200, Pit M. wrote:
> We handle exceptions errors through libpq, and if a FETCH leads to such
> a runtime error, we try to FETCH the first record again.
> The problem is that we can't use this cursor any more -> it seems to be
> corrupt after that error.
An aborted transaction is an aborted transaction, you have to rollback
to a known state before you can go on.
I'm not sure why you can't just change the queries, but in the
particluar case you give, why not just treat them as strings to start
with:
WHERE "CUSTOMERS"."ZIP" >= '10000'
AND "CUSTOMERS"."ZIP" < '20000'
That will produce the same result, but without any chance of errors...
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера