duckdb_engine icon indicating copy to clipboard operation
duckdb_engine copied to clipboard

feat: Add support for auto-incremented SERIAL columns

Open ml31415 opened this issue 1 year ago • 5 comments

Fixes #289

ml31415 avatar Jan 06 '24 15:01 ml31415

I just ran into this again 😬 It would be great to get this in here to work around the limitation in duckdb

dhirschfeld avatar Feb 19 '24 13:02 dhirschfeld

Hi @Mause ! Would you mind reviewing this PR? I guess it's the best workaround for the SERIAL issue currently available, until there is native support for it in duckdb.

ml31415 avatar Feb 29 '24 18:02 ml31415

:+1:

It would be nice to include SMALLSERIAL/SMALLINT as well.

jobh avatar Apr 08 '24 07:04 jobh

It would be great if a similar trick could be used to support GENERATED ALWAYS AS IDENTITY which is the standardised form (which postgres also supports).

  • https://peter.eisentraut.org/blog/2023/10/31/sql-identity-columns
  • https://www.danieleteti.it/post/postgresql-identities-vs-serials/

Maybe that's tricky enough to be best left for a follow-up PR though...

dhirschfeld avatar Apr 08 '24 11:04 dhirschfeld

It would be great if a similar trick could be used to support GENERATED ALWAYS AS IDENTITY which is the standardised form (which postgres also supports).

I guess this would better be handled by duckdb itself, as you mentioned there already: https://github.com/duckdb/duckdb/issues/1768

ml31415 avatar Apr 30 '24 14:04 ml31415