Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

public.create_partition: drop rule logic from here

No point maintaing it in two places.

Let the code stay as-is.
  • Loading branch information...
commit dc45a7ebc45e18c63fd192eeeca6e55be3b0a300 1 parent efd1985
@markokr authored
View
12 sql/dispatch/create_partition.sql
@@ -125,18 +125,6 @@ begin
execute sql;
end loop;
- -- copy rules
- for r in
- select rulename, definition,
- substring(definition from ' TO (([a-z0-9._]+|"([^"]+|"")+")+)') as oldtbl
- from pg_catalog.pg_rules
- where schemaname = parent_schema
- and tablename = parent_name
- loop
- sql := replace(r.definition, r.oldtbl, fq_part);
- execute sql;
- end loop;
-
return 1;
end;
$$ language plpgsql;
View
2  sql/dispatch/expected/test_create_part.out
@@ -50,7 +50,7 @@ select count(*) from pg_constraint where conrelid = 'public.events_2011_01'::reg
select count(*) from pg_rules where schemaname = 'public' and tablename = 'events_2011_01';
count
-------
- 1
+ 0
(1 row)
-- \d events_2011_01
Please sign in to comment.
Something went wrong with that request. Please try again.