type conversion fails

From: "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: type conversion fails
Date: 2001-05-30 16:05:03
Message-ID: Pine.LNX.4.21.0105301204330.317-100000@aluminum.cs.pitt.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Postgres operator 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.

Browse pgsql-general by date

  From Date Subject
Next Message Thalis A. Kalfigopoulos 2001-05-30 16:11:58 Re: Preventing variables from "rolling over"
Previous Message Anand Raman 2001-05-30 15:34:25 Re: LIKE erratic? or unseen DB corruption?