type conversion fails - Mailing list pgsql-general

From Thalis A. Kalfigopoulos
Subject type conversion fails
Date
Msg-id Pine.LNX.4.21.0105301204330.317-100000@aluminum.cs.pitt.edu
Whole thread Raw
List pgsql-general
In manual page
http://postgresql.readysetnet.com/users-lounge/docs/7.1/postgres/typeconv-oper.html
it says that:

<QUOTE>
5.2.1.3. Factorial

This example illustrates an interesting result. Traditionally, the factorial operator is defined for integers only. The
Postgresoperator catalog has only one entry for factorial, taking an integer operand. If given a non-integer numeric
argument,Postgres will try to convert that argument to an integer for evaluation of the factorial.  

tgl=> select (4.3 !);
 ?column?
----------
       24
(1 row)
</QUOTE>

and on my 7.1.1 I get:

test=#  select (4.3 !);
ERROR:  Unable to identify a right operator '!' for type 'float8'
    You may need to add parentheses or an explicit cast


doc|source bug?

regards,
t.



pgsql-general by date:

Previous
From: Anand Raman
Date:
Subject: Re: LIKE erratic? or unseen DB corruption?
Next
From: Jan Wieck
Date:
Subject: Re: Re: OID wrap around