Re: Smallint - Integer Casting Problems in Plpgsql functions

From: Richard Huxton <dev(at)archonet(dot)com>
To: Denis Gasparin <denis(at)edistar(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Smallint - Integer Casting Problems in Plpgsql functions
Date: 2004-03-17 17:26:01
Message-ID: 200403171726.01377.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 17 March 2004 15:54, Denis Gasparin wrote:
> Hi, i'm upgrading our database from postgresql 7.2.3 to 7.4.2.
> The import went fine but i have some casting problems with plpgsql
> functions.
>
> I've create a test function with this code:
>
> create function test(varchar,smallint,integer) returns integer as '

> select test('aaa',1,1);
> gives me the following error:
> ERROR: function test("unknown", integer, integer) does not exist

Easiest solution is to just define the function as accepting integer rather
than smallint.
I believe the typeing will be smarter in 7.5 but don't know if it will affect
this situation.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2004-03-17 17:28:57 Re: Check constraint
Previous Message Richard Huxton 2004-03-17 17:20:46 Re: Converting Data From MS-Sql Server