Re: complicated query (newbie..)

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: complicated query (newbie..)
Дата
Msg-id 20090409171617.GT12225@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: complicated query (newbie..)  (Marcin Krol <mrkafk@gmail.com>)
Ответы Re: complicated query (newbie..)  (Marcin Krol <mrkafk@gmail.com>)
Список pgsql-general
On Thu, Apr 09, 2009 at 07:03:55PM +0200, 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)

You *need* those quotes in there; you need to figure out what's going on
there first before going any further.  Maybe the reservation dates for
that entry are "confused" for some reason, or you've got the date in the
wrong format or something (i.e. you're expecting dd/mm/yyyy and you're
getting mmm/dd/yyyy or something else).

> - 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.

This is a big hint that things are going wrong.  You need those quotes
in there, an "integer" is a plain number and not a date.

--
  Sam  http://samason.me.uk/

В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: complicated query (newbie..)
Следующее
От: Marcin Krol
Дата:
Сообщение: Re: complicated query (newbie..)