X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D958CD1C9E4 for ; Fri, 1 Aug 2003 02:08:04 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 02395-06 for ; Thu, 31 Jul 2003 23:07:00 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id D43A8D1C9E2 for ; Thu, 31 Jul 2003 23:08:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h71281Q3003766; Thu, 31 Jul 2003 22:08:01 -0400 (EDT) To: Gavin Sherry Cc: pgsql-patches@postgresql.org Subject: Re: Numeric version of factorial() In-reply-to: References: Comments: In-reply-to Gavin Sherry message dated "Fri, 01 Aug 2003 11:57:03 +1000" Date: Thu, 31 Jul 2003 22:08:01 -0400 Message-ID: <3765.1059703681@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/251 X-Sequence-Number: 7838 Gavin Sherry writes: > What are your feelings about numeric argument vs. int4/int8 arguments? Actually I think it'd be fine to take int8. We'd not be able to cope with any larger input anyway, and the inner loop could be noticeably faster if the control logic just deals with int. We could leave the factorial(numeric) case open for a future implementation that uses gamma, if anyone gets hot to do it. regards, tom lane