Multilevel partitioning - Mailing list pgsql-general

From pasman pasmański
Subject Multilevel partitioning
Date
Msg-id k2i77a9beeb1005050711k937899eaj9b1f660d9340a3ca@mail.gmail.com
Whole thread Raw
List pgsql-general
I create partitions as below.
And run query: select * from test where grupa='A';
Is planner skip to analyze partitions: test2d, test2e, test2f ?
 
best regards

-------------------------------------------------------------------------------------

CREATE TABLE test (

grupa character varying(1),

id integer,

num integer NOT NULL

);

 

CREATE TABLE test1 (CONSTRAINT "ABC" CHECK (((grupa >= 'A'::text) AND (grupa <= 'C'::text))))

INHERITS (test);

CREATE TABLE test1a (CONSTRAINT "A" CHECK ((grupa = 'A'::text)))

INHERITS (test1);

CREATE TABLE test1b (CONSTRAINT "B" CHECK ((grupa = 'B'::text)))

INHERITS (test1);

CREATE TABLE test1c (CONSTRAINT "C" CHECK ((grupa = 'C'::text)))

INHERITS (test1);

 

 

CREATE TABLE test2 (CONSTRAINT "DEF" CHECK (((grupa >= 'D'::text) AND (grupa <= 'F'::text))))

INHERITS (test);

CREATE TABLE test2d (CONSTRAINT "D" CHECK ((grupa = 'D'::text)))

INHERITS (test2);

CREATE TABLE test2e (CONSTRAINT "E" CHECK ((grupa = 'E'::text)))

INHERITS (test2);

CREATE TABLE test2f (CONSTRAINT "F" CHECK ((grupa = 'F'::text)))

INHERITS (test2);

 

 

pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: temp sequence
Next
From: Daniel Schuchardt
Date:
Subject: dynamically access columns in trigger