Temporal-sql-tool is not respecting SQL_DATABASE env-var for Postgres plugin

Hi there, maybe i’m holding something wrong, but looks like SQL_DATABASE environment variable is not respected by the sql tool. It is always using temporal and temporal_visibility as the database names when using Postgres plugin. I’ve tried passing the db via --db flag as well and it doesn’t seem to work. Is there another way to do it?

You should be able to set custom db name if you wanted. The name used is “databaseName” in static config (see template here and here).

So you should be able to create db with custom name, for example:
./temporal-sql-tool --plugin postgres --ep "localhost" -u "temporal" -p "5432" --db "mycustom" create

and then use “mycustom” as the db name in your static config.