mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 23:59:27 -05:00
Retrying a failed zero-ETL destination reloaded it through the admin connection without checking the caller, so a role that could not create the database still got it back. The retry now checks the caller's own privileges first: it goes ahead only for a superuser, or a role with CREATEDB that is a member of the database's owner, and otherwise refuses with PostgreSQL's own "permission denied to create database". The database name is quoted with PostgresWire.quoteLiteral. A nightly Docker check runs each condition against a real PostgreSQL 16, and both test classes share one fixture.