mirror of
https://gitlab.com/depesz/explain.depesz.com.git
synced 2024-11-24 08:42:27 +02:00
move partitions to public schema
This commit is contained in:
parent
bbd30be2ff
commit
0951a8d583
3
sql/patch-014.sql
Normal file
3
sql/patch-014.sql
Normal file
@ -0,0 +1,3 @@
|
||||
SELECT format('ALTER TABLE plans.%I SET SCHEMA public;', relname) FROM pg_class WHERE relkind = 'r' AND relnamespace = 'plans'::regnamespace \gexec
|
||||
SELECT format('ALTER TABLE public.%I rename to %I;', relname, 'plans_' || relname) FROM pg_class WHERE relkind = 'r' AND relnamespace = 'public'::regnamespace AND relname ~ '^part_[0-9]+$' \gexec
|
||||
DROP SCHEMA plans;
|
Loading…
Reference in New Issue
Block a user