News for hackers. Stuff that matters.
Re:Features I'd Like in PostgreSQL by forrest2 on Sunday January 29, 2023 @01:55AM (#34565618)
or perhaps for some applications it would be sufficient to do

playlists {

  id

  song_ids []
}

-------------

and just store the ordering in an array. Some postgres drivers might start shitting the bed though at some gigantic array sizes, but a playlist probably has reasonable enough limits that you wouldn't have a big problem.

Re:Features I'd Like in PostgreSQL by Tostino on Sunday January 29, 2023 @10:43AM (#34569075)
This is the exact solution I came up with.
Re:Features I'd Like in PostgreSQL by danielheath on Sunday January 29, 2023 @11:55PM (#34575897)
ID arrays can't use FK constraints (requested elsewhere in these comments), otherwise that would be pretty good. Performance-wise it means more IO than optimal, but that's not necessarily a huge problem.