mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 18:17:57 +00:00
SET only applies to the current migration session and is lost when the
connection closes. Use a DO block with current_database() to execute
ALTER DATABASE ... SET, which persists the GUC for all future connections.
The DO block with format('%I', current_database()) avoids hardcoding
the database name and works on PostgreSQL < 16 (which lacks ALTER DATABASE
CURRENT syntax).