Re: RE : How do I compile/test a PL/SQL in Postgresql - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: RE : How do I compile/test a PL/SQL in Postgresql
Date
Msg-id 20060720153754.44393.qmail@web31805.mail.mud.yahoo.com
Whole thread Raw
In response to Re: RE : How do I compile/test a PL/SQL in Postgresql  ("Patrick Ng" <patrick.ng@zuji.com>)
List pgsql-novice
> select metahsia.sf_pop_hsia_cal_year_tab();
> I got this error :
> ERROR:  function to_char(integer) does not exist
> HINT:  No function matches the given name and argument types. You may
> need to add explicit type casts
>
> It seems that its expecting no parameter to default to at least one
> integer parameter. Is this the case? Does this mean that there must
> always be at least one parameter for stored function. None of the
> documentation seems to explicit mention this.

Perhaps, to_char is not being used correctly.
You could try:
http://www.postgresql.org/docs/8.1/interactive/functions-formatting.html
psql> \df  -- to list all of avaliable functions to see if another one will work

or you could try:
http://www.postgresql.org/docs/8.1/interactive/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS
CAST (integer 1234 AS char)

But it is hard to say what the actual problem is with out seeing your function.
Regards,
Richard Broersma Jr.

pgsql-novice by date:

Previous
From: "Patrick Ng"
Date:
Subject: Re: RE : How do I compile/test a PL/SQL in Postgresql
Next
From: "Michael Muratet US-Huntsville"
Date:
Subject: initdb fails quietly