On Tue, Sep 28, 2010 at 4:07 PM, Jeff Davis wrote:
> On Tue, 2010-09-28 at 12:18 -0600, Eric McKeeth wrote:
>
> > This is ugly, but it does seem to enforce the constraint I need, of
> > non-overlapping dates where sharing an endpoint is not considered an
> > overlap.
>
> The period type supports
On Tue, 2010-09-28 at 12:18 -0600, Eric McKeeth wrote:
> This is ugly, but it does seem to enforce the constraint I need, of
> non-overlapping dates where sharing an endpoint is not considered an
> overlap.
The period type supports different inclusivity/exclusivity combinations.
So, the period:
On Fri, Sep 24, 2010 at 3:22 PM, Tom Lane wrote:
> Eric McKeeth writes:
> > why would I get the following error, since the period() function is in
> fact
> > declared as immutable?
>
> > test=# ALTER TABLE test3 ADD exclude using
> > gist(period(effect_date::timestamptz, expire_date::timestamptz
On Sun, Sep 26, 2010 at 10:15:00AM -0400, Tom Lane wrote:
> David Fetter writes:
> > On Fri, Sep 24, 2010 at 05:22:15PM -0400, Tom Lane wrote:
> >> period() might be immutable, but those casts from date to
> >> timestamptz are not, because they depend on the TimeZone
> >> parameter.
>
> > How har
David Fetter writes:
> On Fri, Sep 24, 2010 at 05:22:15PM -0400, Tom Lane wrote:
>> period() might be immutable, but those casts from date to
>> timestamptz are not, because they depend on the TimeZone parameter.
> How hard would it be to point out the first expression found to be
> mutable?
I l
On Fri, Sep 24, 2010 at 05:22:15PM -0400, Tom Lane wrote:
> Eric McKeeth writes:
> > why would I get the following error, since the period() function
> > is in fact declared as immutable?
>
> > test=# ALTER TABLE test3 ADD exclude using
> > gist(period(effect_date::timestamptz, expire_date::times
Eric McKeeth writes:
> why would I get the following error, since the period() function is in fact
> declared as immutable?
> test=# ALTER TABLE test3 ADD exclude using
> gist(period(effect_date::timestamptz, expire_date::timestamptz) with && );
> ERROR: functions in index expression must be mar
I'm getting an error message that doesn't make sense to me. Using PostgreSQL
9.0.0 on CentOS 5.5.
Given the following table and function definitions
CREATE TABLE test3
(
test3_id serial NOT NULL,
fk_id integer,
data_3 text,
effect_date date NOT NULL,
expire_date date NOT NULL,
CONSTR