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 588E59DC81D for ; Mon, 6 Mar 2006 07:13:34 -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 93403-07 for ; Mon, 6 Mar 2006 07:13:36 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web54306.mail.yahoo.com (web54306.mail.yahoo.com [206.190.49.116]) by postgresql.org (Postfix) with SMTP id ACDEC9DCC42 for ; Mon, 6 Mar 2006 07:13:31 -0400 (AST) Received: (qmail 83985 invoked by uid 60001); 6 Mar 2006 11:13:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Na8UEX4MI8atw0GkvdSmsL165+xisuGqMBJUcjPT+FH13XQwO9ocet+WqM8gFrEFfnBXgfrrKpjN8PPmtWVTqGT9LZZg7vZYZD4C+i/mUr/2bGM63QAVHu2yJ1Z3rcD27MKYJ26qPImzeNRkEq5BxPb3uuWwtwpZX4QHp/7Azeo= ; Message-ID: <20060306111333.83983.qmail@web54306.mail.yahoo.com> Received: from [213.91.244.26] by web54306.mail.yahoo.com via HTTP; Mon, 06 Mar 2006 03:13:33 PST Date: Mon, 6 Mar 2006 03:13:33 -0800 (PST) From: Emil Rachovsky Subject: Re: problem with overloading the "coalesce" function To: Richard Huxton Cc: "pgsql-general@postgresql.org" , "pgsql-sql@postgresql.org" In-Reply-To: <440C11D9.3090907@archonet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.914 required=5 tests=[AWL=-0.444, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_WHOIS=0.879] X-Spam-Score: 0.914 X-Spam-Level: X-Archive-Number: 200603/199 X-Sequence-Number: 92064 --- Richard Huxton wrote: > 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? The error is : invalid input syntax for integer That is,it expects an integer as a second parameter, since the first is an integer. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com