7
7
700Hp2021-11-20 03:30:22
PostgreSQL
700Hp, 2021-11-20 03:30:22

Is it possible to write data to postgres temporarily?

Is it possible to assign the value true to any variable, and after 3 hours it is independently redefined to false?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2021-11-20
@700Hp

for such a task, not boolean is written to the database, but the time at the time of recording, and in the select query they do
select now()-start_time<=3 часа from ....

V
Vasily Bannikov, 2021-11-20
@vabka

It is possible, but for this you will have to write a stored procedure, and run it by distribution, using cron, or some extension.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question