Currently PostgreSqlPlatform only recognizes serial columns. However, PostgreSQL 10+ supports SQL-standard identity columns:
CREATE TABLE test (
id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY
)
These only have implicit sequences that PostgreSqlPlatform currently cannot reflect, and thus the driver cannot fetch the last inserted id.
The pg_get_serial_sequence function seems to work for both serial columns, and identity columns, so perhaps it could be used to get the attached sequence name in PostgreSqlPlatform. And, for completeness sake, the is_autoincrement column should also check whether a.attidentity != ''
Currently PostgreSqlPlatform only recognizes serial columns. However, PostgreSQL 10+ supports SQL-standard identity columns:
These only have implicit sequences that PostgreSqlPlatform currently cannot reflect, and thus the driver cannot fetch the last inserted id.
The
pg_get_serial_sequence
function seems to work for both serial columns, and identity columns, so perhaps it could be used to get the attached sequence name in PostgreSqlPlatform. And, for completeness sake, the is_autoincrement column should also check whethera.attidentity != ''