Re: constraint partition issue - Mailing list pgsql-general

From Tom Lane
Subject Re: constraint partition issue
Date
Msg-id 24449.1300978344@sss.pgh.pa.us
Whole thread Raw
In response to Re: constraint partition issue  (hyelluas <helen_yelluas@mcafee.com>)
List pgsql-general
hyelluas <helen_yelluas@mcafee.com> writes:
> You are right to the point, Tom.
> The datex is timestamp with time zone and the constraints were created as
> timestamp without time zone.
> As soon as I fixed that , it all started working.

OK.  In case anybody is wondering *why* that fixed it: a comparison
between timestamp with time zone and timestamp without time zone isn't
immutable, because it depends on the "timezone" runtime parameter to
interpret the timestamp without time zone.  So the planner can't rely
on deductions about the comparison while making the plan --- they might
not be true anymore by the time the plan is executed.  Upshot is that
the constraint exclusion machinery ignores these constraints.

            regards, tom lane

pgsql-general by date:

Previous
From: Erik Hesselink
Date:
Subject: Re: Deadlock in libpq
Next
From: Tom Lane
Date:
Subject: Re: Deadlock in libpq