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.
playlists {
}-------------
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.