summaryrefslogtreecommitdiff
path: root/lib/Catmandu/Store/DBI/Handler/Pg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Catmandu/Store/DBI/Handler/Pg.pm')
-rw-r--r--lib/Catmandu/Store/DBI/Handler/Pg.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Catmandu/Store/DBI/Handler/Pg.pm b/lib/Catmandu/Store/DBI/Handler/Pg.pm
index af6178a..0f1e82a 100644
--- a/lib/Catmandu/Store/DBI/Handler/Pg.pm
+++ b/lib/Catmandu/Store/DBI/Handler/Pg.pm
@@ -66,10 +66,10 @@ IF NOT EXISTS (
FROM pg_class c
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = '${name}_${col}_idx'
- AND n.nspname = 'public'
+ AND n.nspname = (SELECT CURRENT_SCHEMA)
) THEN
- CREATE INDEX ${name}_${col}_idx ON public.${name} (${q_col});
+ CREATE INDEX ${name}_${col}_idx ON ${name} (${q_col});
END IF;
END\$\$;