Re: Weird type selection choice

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Weird type selection choice
Date: 2007-11-07 10:21:27
Message-ID: 200711071121.27975.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I noticed this problem in 8.2 and 8.3:
>
> pei=# select mod( trunc( 1 ), 2 );
> ERROR: 42883: function mod(double precision, integer) does not exist
> LINE 1: select mod( trunc( 1 ), 2 );
> ^

I suppose there will be little interest in including the obvious solution,
namely

CREATE FUNCTION pg_catalog.trunc(int) RETURNS int AS $$ SELECT $1; $$ LANGUAGE
SQL STRICT IMMUTABLE;

into PostgreSQL.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-11-07 10:45:22 Re: Visibility map thoughts
Previous Message Hannu Krosing 2007-11-07 09:10:19 Re: Test lab