Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group