Skip to content

Conversation

@mason-sharp
Copy link
Member

  • In 2.2, it was possible to use snowflake.convert_sequence_to_snowflake() for cases like this.

CREATE SEQUENCE favorite_seq;
CREATE TABLE t4 (x integer DEFAULT nextval('favorite_seq'::regclass));

This was no longer possible in 2.3, add back such support.

  • Also reallow conversions of plain sequences in case applications are using sequences not associated with any tables.

  • The function snowflake.convert_sequence_to_snowflake() is updated to use consistent variable naming conventions.

  • Prepare code for a future 2.4 release

For plain sequences and explict default value sequences.

Also, update to use the same naming convention for variables.
@mason-sharp mason-sharp requested a review from danolivo October 30, 2025 18:32
snowflake--2.2--2.3.sql \
snowflake--2.3.sql
snowflake--2.3.sql \
snowflake--2.3--2.4.sql
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can patch version 2.3 directly, if it hasn't been released yet. At least, it would be easier to see the changes.

Copy link
Member Author

@mason-sharp mason-sharp Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! We did create a tag though. Let me check with a couple of people.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will go with 2.4 after all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason? Someone officially released 2.3?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The v2.3 has been sitting out there a while. No big deal to just go to 2.4 instead of messing someone up who is using the repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say we should be more strict about release cuts in this case. A new version of an extension is always a massive pain for developers and a source of multiple bugs.
If you still insist on the new version, please don't forget to attach snowflake--2.4.sql.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for a snowflake--2.4.sql file, there is an ugrade path file to 2.4. CREATE EXTENSION will execute snowflake--2.3.sql and then snowflake--2.3--2.4.sql.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct me if I'm wrong, but we have versions like snowflake--2.3 and spock--5.0.0.sql. This is a common practice. The reason behind it is that the update scripts can be messy for developers and prone to errors. Furthermore, users generally prefer to see the complete script rather than just the transient parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants