Peter Eisentraut wrote:
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;

It does sound totally useless...

Why would you run a query like that in the first place? It seems like a useless query as it is. Is there a bigger story behind it?

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to