Created
May 11, 2017 22:57
-
-
Save vincentdesmares/871986eaec36cf723dca080d66141e3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create the master table tablename_with_partition: | |
-- You should use the same exact schema as the one from the non partitioned table. | |
CREATE TABLE tablename_with_partition | |
( | |
id integer NOT NULL DEFAULT nextval('tablename'::regclass), | |
"name" character varying(150) NOT NULL, | |
description text NOT NULL, | |
period character varying(10) NOT NULL | |
CONSTRAINT tablename_with_partition_pkey PRIMARY KEY (id) | |
) WITH ( OIDS=FALSE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment