Skip to content

Instantly share code, notes, and snippets.

@umitanuki
Created June 14, 2011 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umitanuki/1024412 to your computer and use it in GitHub Desktop.
Save umitanuki/1024412 to your computer and use it in GitHub Desktop.
create 1000 inherit table
do $$ declare declare begin for i in 1 .. 1000 loop execute 'create table myt' || i || '(check (id between ' || (i * 99) || ' and ' || (i * 100) || ' )) inherits(size_m)'; end loop; end; $$;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment