Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]:Not implemented Error: currval/nextval requires a constant sequence - non-constant sequences are no longer supported #1061

Open
1 task done
xor2003 opened this issue Jul 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@xor2003
Copy link

xor2003 commented Jul 23, 2024

What happened?

What does this error mean?

id_seq_name = "id_seq"
id_seq_journal = sqlalchemy.Sequence(f"{id_seq_name}_journal")  # Workaround for DuckDB SERIAL type issue
# https://github.com/Mause/duckdb_engine#auto-incrementing-id-columns

# Define the table
t_journal = Table(
    "journal",
    metadata,
    Column(
        "id",
        Integer,
        id_seq_journal,
        server_default=id_seq_journal.next_value(),
        primary_key=True,
        comment="id",
    ),


>               self.__c.execute(statement, parameters)

DuckDB Engine Version

0.13.0

DuckDB Version

1.0.0

SQLAlchemy Version

1.4.52

Relevant log output

duckdb.duckdb.NotImplementedException: Not implemented Error: currval/nextval requires a constant sequence - non-constant sequences are no longer supported

Code of Conduct

  • I agree to follow this project's Code of Conduct
@xor2003 xor2003 added the bug Something isn't working label Jul 23, 2024
@xor2003
Copy link
Author

xor2003 commented Jul 24, 2024

It was working fine with duckdb 0.7.1 and 0.9.2

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants