X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3E5D79DCCA7; Mon, 6 Mar 2006 07:00:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91280-03; Mon, 6 Mar 2006 07:00:14 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by postgresql.org (Postfix) with ESMTP id 4D0399DCBDA; Mon, 6 Mar 2006 07:00:07 -0400 (AST) Received: from [213.162.97.75] (helo=mail.metronet.co.uk) by ptb-relay03.plus.net with esmtp (Exim) id 1FGDRh-0007vX-Aj; Mon, 06 Mar 2006 11:00:09 +0000 Received: from mainbox.archonet.com (unknown [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 2B3C440DBBF; Mon, 6 Mar 2006 10:41:30 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id AAE62FF04; Mon, 6 Mar 2006 10:41:29 +0000 (GMT) Message-ID: <440C11D9.3090907@archonet.com> Date: Mon, 06 Mar 2006 10:41:29 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Emil Rachovsky Cc: "pgsql-general@postgresql.org" , "pgsql-sql@postgresql.org" Subject: Re: problem with overloading the "coalesce" function References: <20060306101812.89563.qmail@web54308.mail.yahoo.com> In-Reply-To: <20060306101812.89563.qmail@web54308.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.121 required=5 tests=[AWL=0.121] X-Spam-Score: 0.121 X-Spam-Level: X-Archive-Number: 200603/198 X-Sequence-Number: 92063 Emil Rachovsky wrote: > > Hi, > I am trying to overload the "coalesce" function to > accept an integer and a string. Here it is : > > CREATE OR REPLACE FUNCTION "coalesce"(a int4, b > "varchar") > RETURNS "varchar" AS ... > I have added it to pg_catalog, but still I cant't use > it, I get an error on the second parameter What is the error? -- Richard Huxton Archonet Ltd