S
S
shdprogrammer2016-04-20 22:32:41
PostgreSQL
shdprogrammer, 2016-04-20 22:32:41

Why is there no query result in postgresql?

Actually there is a query like:

UPDATE table
SET column = subquery.column2
FROM (VALUES (1148339, 'something'),(1148340, 'something'),(1148341, 'something')) as subquery
WHERE id = subquery.column1

It is executed based on the results of the administrator's work in the django admin panel, by pressing the save button. Executed through the celery task, immediately. It works quite well, except for one option - if the admin double-clicked on the save button - the result of the request is not visible. Moreover, the task is set only at the first click, since the condition is no longer fulfilled at the second. I see the request itself in the celery logs, and I also see it in the postgresql logs, but there is no result of its work. I suspect that perhaps because of something the database rolls back the transaction, but I don’t know how to make sure of this. Yes, and the actual rollback is just an assumption.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question