How to set PostgreSQL script parameters in DBeaver or PgAdmin?

Viewed 391

PostgreSQL v12.6 DBEaver 7.1.0

How to set SQL script parameters in DBeaver or PgAdmin? (any working option is welcome)

This script works perfectly when I run it as a script on DB initialization
(i.e. from Docker's postgres:12.6-alpine in /docker-entrypoint-initdb.d/init.sql. No doubts this script is valid for execution through psql.

\set app_schema  my_schema
\set app_username  my_app
\set app_password  my_app_pwd
 
CREATE SCHEMA :app_schema;
ALTER SCHEMA :app_schema OWNER TO "admin";
CREATE USER :app_username WITH PASSWORD :'app_password';

But I cannot find a way to set parameters in DBeaver script. Non of these is valid:

\set app_schema  my_schema
set app_schema=my_schema
set :app_schema=my_schema
:app_schema=my_schema
... and many more ...

As well did not find any information about doing this in PGAdmin.

0 Answers
Related