Re: problem with overloading the "coalesce" function

From: Emil Rachovsky <zsevgymko(at)yahoo(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: problem with overloading the "coalesce" function
Date: 2006-03-06 11:13:33
Message-ID: 20060306111333.83983.qmail@web54306.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

--- Richard Huxton <dev(at)archonet(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-03-06 11:29:56 Re: problem with overloading the "coalesce" function
Previous Message Richard Huxton 2006-03-06 10:41:29 Re: problem with overloading the "coalesce" function

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2006-03-06 11:29:56 Re: problem with overloading the "coalesce" function
Previous Message Richard Huxton 2006-03-06 10:41:29 Re: problem with overloading the "coalesce" function