Search Postgresql Archives

Re: complicated query (newbie..)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux