Using Spock with Snowflake Sequences

We strongly recommend that you use Snowflake Sequences instead of legacy PostgreSQL sequences.

Snowflake (opens in a new tab) is a PostgreSQL extension that provides an int8 and sequence based unique ID solution to optionally replace the PostgreSQL built-in bigserial data type. This extension allows Snowflake IDs that are unique within one sequence across multiple PostgreSQL instances in a distributed cluster.

The Spock extension includes the following functions to help you manage Snowflake sequences:

  • spock.convert_sequence_to_snowflake
  • spock.convert_column_to_int8