Re: complicated query (newbie..)

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Marcin Krol <mrkafk(at)gmail(dot)com>
Cc: Sam Mason <sam(at)samason(dot)me(dot)uk>, PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: complicated query (newbie..)
Date: 2009-04-09 17:11:48
Message-ID: 49DE2C54.8050304@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/04/2009 18:03, Marcin Krol wrote:
> - If I quote date values like '2009-04-09' it doesn't work again! I.e.
> result set includes one host id that should have been excluded (bc it
> has reservation whose date doesn't match the condition)
>
> - I have replaced OVERLAPS with explicit date condition bc PG complained:
>
> ERROR: function pg_catalog.overlaps(date, date, integer, integer) does
> not exist
> HINT: No function matches the given name and argument types. You may
> need to add explicit type casts.

I'd imagine this is the same problem as in your other post - if you
don't quote the dates, PG thinks each is an integer expression. The
error says it's looking for an OVERLAPS function that takes two dates
and two integers, which of course doesn't exist.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-04-09 17:16:17 Re: complicated query (newbie..)
Previous Message Marcin Krol 2009-04-09 17:03:55 Re: complicated query (newbie..)