Re: constraint checking on partitions

From: "Chris Spotts" <rfusca(at)gmail(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'postgres list'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: constraint checking on partitions
Date: 2009-07-09 18:59:30
Message-ID: 00ba01ca00c7$649a0db0$2dce2910$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Thursday, July 09, 2009 1:52 PM
> To: Chris Spotts
> Cc: 'postgres list'
> Subject: Re: [GENERAL] constraint checking on partitions
>
> "Chris Spotts" <rfusca(at)gmail(dot)com> writes:
> > Then this is also run
>
> > alter table O add constraint notjuly check (NOT(date1 >= '2009-07-01'
> and
> > date1 < '2009-07-01'))
>
> > The planner excludes correctly except that it always checks O.
>
> What are the actual queries you're hoping it will exclude for?
>
> regards, tom lane
[Spotts, Christopher]

I mistyped, that should be

alter table D add constraint onlyjuly check (date1 >= '2009-07-01' and date1
< '2009-08-01')
Then this is also run
alter table O add constraint notjuly check (NOT(date1 >= '2009-07-01' and
date1 < '2009-08-01'))

If I ran a select * from A where date1 >= '2009-07-02' and date1 <
'2009-07-15' then I would think it wouldn't check O.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-07-09 19:09:04 Re: constraint checking on partitions
Previous Message Tom Lane 2009-07-09 18:51:38 Re: constraint checking on partitions