Re: [7.3.x] function does not exist ... ?

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Subject: Re: [7.3.x] function does not exist ... ?
Date: 2003-11-10 20:04:20
Message-ID: 3FAFEF44.2090108@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marc G. Fournier wrote:

> 'k, this doesn't look right, but it could be that I'm overlooking
> something ...
>
> The function I created:
>
> CREATE FUNCTION month_trunc (timestamp without time zone) RETURNS timestamp without time zone
> AS 'SELECT date_trunc(''month'', $1 )'
> LANGUAGE sql IMMUTABLE;
>
>
> The query that fails:
>
> ams=# select * from traffic_logs where month_trunc(runtime) = month_trunc(now());
> ERROR: Function month_trunc(timestamp with time zone) does not exist
> Unable to identify a function that satisfies the given argument types
> You may need to add explicit typecasts

now return a timestamp with time zone and your function
take a timestamp without time zone.
^^^^^^^

Regards
Gaetano Mendola

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2003-11-10 20:13:46 Re: [7.3.x] function does not exist ... ?
Previous Message Ed Baer 2003-11-10 19:47:07 PostgreSQL Backup problems with tsearch2