Answer the question
In order to leave comments, you need to log in
How to sort list by time using id in Postgresql?
+ another question, is it possible to do insert and update in one query?
for example, to make an insert into the table if there is no such key. while I do this. insert, if there is no error, then you can update. Thank you!
Answer the question
In order to leave comments, you need to log in
Sorting solved using subqueries.
SELECT * FROM post WHERE date >(SELECT datepst FROM post WHERE id =$1) ORDER BY date
ASC In such a case, using transactions worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question