Permalink
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...
1 parent efd1985 commit dc45a7ebc45e18c63fd192eeeca6e55be3b0a300 @markokr committed May 25, 2012
Showing with 1 addition and 13 deletions.
  1. +0 −12 sql/dispatch/create_partition.sql
  2. +1 −1 sql/dispatch/expected/test_create_part.out
@@ -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;
@@ -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

0 comments on commit dc45a7e

Please sign in to comment.