We needed to switch a table from using one sequence to another as the
first stage in merging two tables, and discovered that django can't
pick up the new sequence-name. Actually, it's the postgres-function
that the backend uses that is at fault.
Fortunately I found a way to introspect for the sequence name that
works in many more cases than the current use of
pg_get_serial_sequence: looking up the default value of a column in
"information_schema.columns", column "column_default". See ticket
#27090,
https://code.djangoproject.com/ticket/27090 for some code.
While I'm scratching my immediate itch by updating the forked
postgres-backend we have to use anyway, switching away from
pg_get_serial_sequence would make life much easier and with fewer
surprises for everyone.
I will make a minimalistic, forked backend as a package (as soon as I
understand the style.SQL-stuff) but I do think that not using
pg_get_serial_sequence would be a general improvement for Django 1.11.