Re: RE : How do I compile/test a PL/SQL in Postgresql

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Patrick Ng <patrick(dot)ng(at)zuji(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: RE : How do I compile/test a PL/SQL in Postgresql
Date: 2006-07-20 15:37:54
Message-ID: 20060720153754.44393.qmail@web31805.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Muratet US-Huntsville 2006-07-21 22:28:21 initdb fails quietly
Previous Message Patrick Ng 2006-07-20 15:25:33 Re: RE : How do I compile/test a PL/SQL in Postgresql