Re: temporal period type and select distinct gives equality error

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Arturo Perez <arturo(at)pleeque(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: temporal period type and select distinct gives equality error
Date: 2011-01-26 18:25:33
Message-ID: 1296066333.11513.364.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2011-01-26 at 09:27 -0500, Arturo Perez wrote:
> > and yet when I do a select distinct with a join I get
> >
> > QueryLogger - *** error.
> > org.postgresql.util.PSQLException: ERROR: could not identify an equality
> > operator for type period
> >
> > If I leave the period column out of the select list then it works fine.
> >
> > Did I install it wrong? Or is something else going on?
> >
> > tia
> > arturo
>
> No suggestions from anyone? Anyone out there? :-)

Sorry, I missed this the first time.

I have added support for this in the CVS repository, but have not
included it in the latest release. The thing that's missing from the
released files is a "btree opclass", which is what postgresql uses to
find the right equality operator for DISTINCT.

I am currently working on "range types" which is a patch that will
provide support for PERIOD, as well as many other range types, in core.
That will, of course, support everything you expect, including DISTINCT
on the range type.

We're currently in the middle of the final commit fest for 9.1. After
this is over (or perhaps earlier, if I can find the time), I'll do some
clean up of the existing pgsql-temporal PERIOD type, and do a release of
that.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2011-01-26 19:11:59 Re: Getting the name of the timezone, adjusted for daylight saving
Previous Message MargaretGillon 2011-01-26 18:12:34 Re: Install Pgadmin3 1.12 on ubuntu 10.4 lucid client without postgresql server install