News for hackers. Stuff that matters.
Re:Features I'd Like in PostgreSQL by tshaddox on Sunday January 29, 2023 @01:59AM (#34565638)
If you were going to enforce a maximum size so that you could sort on the client, I bet you could just use an integer and rewrite the entire sequence from 1 to N on every reorder operation. Unless you were expecting to have way more writes than reads, which is a little hard to imagine.
Re:Features I'd Like in PostgreSQL by eatonphil on Sunday January 29, 2023 @09:26AM (#34568391)
> so that you could sort on the client

You could probably also sort in the database with a recursive cte or with PL/pgSQL.

Re:Features I'd Like in PostgreSQL by tshaddox on Sunday January 29, 2023 @03:27PM (#34572350)
Indeed, but AFAIK that is still much slower than sorting on an indexed integer column, which probably means you still need to enforce a maximum list length.