Skip to content

Commit 53b4b18

Browse files
committed
feat: Support Patroni 4.0.4
1 parent 2704d31 commit 53b4b18

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

stackgres-k8s/src/operator/src/main/resources/shardingsphere/shardingsphere-create-database.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ CREATE EXTENSION IF NOT EXISTS dblink;
22

33
DO $createdatabase$
44
BEGIN
5-
IF NOT EXISTS (SELECT * FROM pg_database WHERE datname = $quoted$%1$s$quoted$) THEN
5+
IF NOT EXISTS (SELECT * FROM pg_database WHERE datname = %1$s) THEN
66
PERFORM dblink_exec(
77
'host=/var/run/postgresql port=5432 user=' || CURRENT_USER || ' sslmode=disable dbname=' || current_database(),
8-
'CREATE DATABASE ' || quote_ident($quoted$%1$s$quoted$));
8+
'CREATE DATABASE ' || quote_ident(%1$s));
99
END IF;
1010
END$createdatabase$;

stackgres-k8s/src/operator/src/main/resources/shardingsphere/shardingsphere-update-shards.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ BEGIN
1414
PASSWORD = %6$s);
1515
$rdl$,
1616
'ds_' || worker_index,
17-
format(%2$s, worker_index)));
17+
quote_literal(format(%2$s, worker_index))));
1818
END LOOP;
1919
END$updateworkers$;

0 commit comments

Comments
 (0)