<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Snowflake on Mimus</title><link>https://mimus.pgsty.com/docs/spock/upstream/snowflake/</link><description>Recent content in Snowflake on Mimus</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://mimus.pgsty.com/docs/spock/upstream/snowflake/index.xml" rel="self" type="application/rss+xml"/><item><title>Snowflake Functions</title><link>https://mimus.pgsty.com/docs/spock/upstream/snowflake/snowflake-functions/</link><guid>https://mimus.pgsty.com/docs/spock/upstream/snowflake/snowflake-functions/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;Upstream reference for Snowflake 2.6.1. Mimus 19.0.1 integrates &lt;a href="https://mimus.pgsty.com/docs/spock/"&gt;Spock 5.0.15&lt;/a&gt;. Compatibility of Snowflake with Mimus is unverified.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;You can query the following Snowflake functions at the psql command line to return useful information about tables that use Snowflake sequences.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;&lt;code&gt;snowflake.nextval([sequence regclass])&lt;/code&gt;&lt;/strong&gt;&#10;Generates the next Snowflake in the specified sequence. If no sequence is specified, the internal, database-wide sequence &lt;code&gt;snowflake.id_seq&lt;/code&gt; is used. For example, the following query returns the next number in the &lt;code&gt;orders_id_seq&lt;/code&gt; sequence:&lt;/p&gt;</description></item><item><title>Reviewing Sequence Definitions in your Table Meta-data</title><link>https://mimus.pgsty.com/docs/spock/upstream/snowflake/review-seq/</link><guid>https://mimus.pgsty.com/docs/spock/upstream/snowflake/review-seq/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;Upstream reference for Snowflake 2.6.1. Mimus 19.0.1 integrates &lt;a href="https://mimus.pgsty.com/docs/spock/"&gt;Spock 5.0.15&lt;/a&gt;. Compatibility of Snowflake with Mimus is unverified.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;If you query the table meta-data before performing a sequence conversion with the &lt;code&gt;\d+ orders&lt;/code&gt; command, the PostgreSQL sequence is defined in the &lt;code&gt;Default&lt;/code&gt; column:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-7b47282f-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="sh" data-td-line-count="10"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-7b47282f-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;acctg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="c1"&gt;# \d+ orders;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Table &lt;span class="s2"&gt;&amp;#34;public.orders&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Column &lt;span class="p"&gt;|&lt;/span&gt; Type &lt;span class="p"&gt;|&lt;/span&gt; Collation &lt;span class="p"&gt;|&lt;/span&gt; Nullable &lt;span class="p"&gt;|&lt;/span&gt; Default &lt;span class="p"&gt;|&lt;/span&gt; Storage &lt;span class="p"&gt;|&lt;/span&gt; Compression &lt;span class="p"&gt;|&lt;/span&gt; Stats target &lt;span class="p"&gt;|&lt;/span&gt; Description &#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;----------+-------------------+-----------+----------+------------------------------------+----------+-------------+--------------+-------------&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; customer &lt;span class="p"&gt;|&lt;/span&gt; character varying &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; extended &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; invoice &lt;span class="p"&gt;|&lt;/span&gt; character varying &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; extended &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; id &lt;span class="p"&gt;|&lt;/span&gt; bigint &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; not null &lt;span class="p"&gt;|&lt;/span&gt; nextval&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;orders_id_seq&amp;#39;&lt;/span&gt;::regclass&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; plain &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Indexes:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;orders_pkey&amp;#34;&lt;/span&gt; PRIMARY KEY, btree &lt;span class="o"&gt;(&lt;/span&gt;id&lt;span class="o"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Access method: heap&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;After performing a conversion, the &lt;code&gt;\d+ table_name&lt;/code&gt; command shows a &lt;code&gt;Default&lt;/code&gt; value of &lt;code&gt;snowflake.nextval('orders_id_seq'::regclass)&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Creating a Snowflake Sequence in a New Cluster</title><link>https://mimus.pgsty.com/docs/spock/upstream/snowflake/creating/</link><guid>https://mimus.pgsty.com/docs/spock/upstream/snowflake/creating/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;Upstream reference for Snowflake 2.6.1. Mimus 19.0.1 integrates &lt;a href="https://mimus.pgsty.com/docs/spock/"&gt;Spock 5.0.15&lt;/a&gt;. Compatibility of Snowflake with Mimus is unverified.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Before you use Snowflake sequences, each node in your cluster must have a unique &lt;code&gt;snowflake.node&lt;/code&gt; identifier. The value ranges from 1 to 1023, and it must be distinct on every node in the cluster.&lt;/p&gt;&#10;&lt;h2 id="setting-snowflakenode-in-a-managed-deployment"&gt;Setting snowflake.node in a managed deployment&#10;&lt;/h2&gt;&#10;&lt;p&gt;A pgEdge deployment assigns &lt;code&gt;snowflake.node&lt;/code&gt; for you, deriving the value from each node&amp;rsquo;s place in the cluster:&lt;/p&gt;</description></item><item><title>Converting a PostgreSQL Sequence to a Snowflake Sequence</title><link>https://mimus.pgsty.com/docs/spock/upstream/snowflake/converting/</link><guid>https://mimus.pgsty.com/docs/spock/upstream/snowflake/converting/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;Upstream reference for Snowflake 2.6.1. Mimus 19.0.1 integrates &lt;a href="https://mimus.pgsty.com/docs/spock/"&gt;Spock 5.0.15&lt;/a&gt;. Compatibility of Snowflake with Mimus is unverified.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;You cannot directly create a snowflake sequence; you must first create a sequence in Postgres and then convert it. Sequences are created explicitly with the &lt;code&gt;CREATE SEQUENCE&lt;/code&gt; command but are also implicitly created by &lt;code&gt;GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY&lt;/code&gt; table columns or &lt;code&gt;SERIAL&lt;/code&gt; and &lt;code&gt;BIGSERIAL&lt;/code&gt; columns. &lt;code&gt;GENERATED AS IDENTITY&lt;/code&gt; is the recommended ANSI SQL method.&lt;/p&gt;</description></item><item><title>Changelog</title><link>https://mimus.pgsty.com/docs/spock/upstream/snowflake/changelog/</link><guid>https://mimus.pgsty.com/docs/spock/upstream/snowflake/changelog/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;Upstream reference for Snowflake 2.6.1. Mimus 19.0.1 integrates &lt;a href="https://mimus.pgsty.com/docs/spock/"&gt;Spock 5.0.15&lt;/a&gt;. Compatibility of Snowflake with Mimus is unverified.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;All notable changes to the Snowflake extension are documented here.&lt;/p&gt;&#10;&lt;h2 id="261"&gt;2.6.1&#10;&lt;/h2&gt;&#10;&lt;h3 id="changed-261"&gt;Changed&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Version bump to 2.6.1 (no catalog changes). Includes release packaging and&#10;CI updates since 2.6.0.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="260"&gt;2.6.0&#10;&lt;/h2&gt;&#10;&lt;h3 id="added"&gt;Added&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Added support for Postgres 19&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="250"&gt;2.5.0&#10;&lt;/h2&gt;&#10;&lt;h3 id="added-1"&gt;Added&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;PG18 support: added a PG18 test configuration and adjusted the Docker&#10;build to skip LLVM bitcode compilation on PG18.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="changed"&gt;Changed&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Adopted three-digit (&lt;code&gt;MAJOR.MINOR.PATCH&lt;/code&gt;) versioning. The extension&#10;version is now &lt;code&gt;2.5.0&lt;/code&gt;.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="fixed"&gt;Fixed&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Fixed dump/restore of snowflake-converted sequences.&#10;&lt;code&gt;convert_sequence_to_snowflake()&lt;/code&gt; previously left &lt;code&gt;MAXVALUE&lt;/code&gt; at&#10;&lt;code&gt;(old last_value + 1)&lt;/code&gt;, but &lt;code&gt;snowflake.nextval()&lt;/code&gt; bypasses &lt;code&gt;MAXVALUE&lt;/code&gt;&#10;and writes snowflake-sized values, so &lt;code&gt;pg_dump&lt;/code&gt; could emit a &lt;code&gt;setval()&lt;/code&gt;&#10;that failed to restore. Sequences are now converted with&#10;&lt;code&gt;AS bigint MAXVALUE 9223372036854775807&lt;/code&gt;, and sequences converted by&#10;earlier versions are auto-repaired on upgrade. (SUP-140)&lt;/li&gt;&#10;&lt;li&gt;Fixed the SQL command used to convert sequences to Snowflake.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="security--ci"&gt;Security / CI&#10;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Pinned GitHub Actions to full commit SHAs to harden against supply&#10;chain attacks.&lt;/li&gt;&#10;&lt;li&gt;Removed &lt;code&gt;shell=True&lt;/code&gt; and shell-injection risks from test runner and&#10;helper subprocess calls; use &lt;code&gt;shlex.split()&lt;/code&gt; for correct argument&#10;tokenization.&lt;/li&gt;&#10;&lt;li&gt;Fixed a SQL injection warning and a missing parameter in&#10;&lt;code&gt;execute_sqlite_query&lt;/code&gt;, and suppressed Bandit B603 warnings on internal&#10;test helper subprocess calls.&lt;/li&gt;&#10;&lt;li&gt;Fixed the Dockerfile &lt;code&gt;ARG&lt;/code&gt; handling for newer BuildKit versions.&lt;/li&gt;&#10;&lt;li&gt;Updated the copyright year to 2026.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/pgEdge/snowflake/blob/9506e1bd5c1f8f8c22df43bdc3efd2b00398ddd8/docs/changelog.md"&gt;Upstream source&lt;/a&gt; · &lt;code&gt;9506e1bd5c1f&lt;/code&gt; · Copyright (c) 2023–2026, pgEdge, Inc.; portions Copyright the PostgreSQL Global Development Group and The Regents of the University of California. &lt;a href="https://mimus.pgsty.com/docs/spock/upstream/about/license/"&gt;PostgreSQL License&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>