B
B
beduin012020-12-10 20:28:33
PostgreSQL
beduin01, 2020-12-10 20:28:33

How to make a selection and set a flag in one step?

I need to fetch the data for processing and set the processing flag for each record. So that I can take data from the database in several threads and each thread would take its data without interfering with others.

How to do it right? And how to set the is_processing flag for all specified id?

SELECT FROM mytable id, path LIMIT 10;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2020-12-10
@gbg

https://habr.com/ru/post/481556/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question