From: | "Andrew J(dot) Kopciuch" <akopciuch(at)bddf(dot)ca> |
---|---|
To: | Joel Burton <joel(at)joelburton(dot)com>, Yonatan Ben-Nes <da(at)canaan(dot)co(dot)il> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Functions just dont want to work! [hard] |
Date: | 2002-12-04 20:25:43 |
Message-ID: | 200212041325.43622.akopciuch@bddf.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Problem is that 24 is not an int2 -- it's an int4 (generic int type).
> For example:
>
Yes it is ... int2 is a two byte integer, meaning it has a range from
-32768 to +32767. Unless I totally mistaken, 24 falls within that range.
Am I missing something vital to this problem? What you have said seems
incorrect to me.
> joel(at)joel=# create function hi(int2) returns bool as 'begin return true;
> end;' language 'plpgsql';
> CREATE FUNCTION
> joel(at)joel=# select hi(42);
> ERROR: Function hi(integer) does not exist
> Unable to identify a function that satisfies the given argument types
> You may need to add explicit typecasts
>
It works fine for me:
test=# create function hi(int2) returns bool as 'begin return true;
test'# end;' language 'plpgsql';
CREATE
test=# select hi(42);
hi
----
t
(1 row)
test=#
What version are you using?
Andy
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Burton | 2002-12-04 20:29:16 | Re: Functions just dont want to work! [hard] |
Previous Message | Jean-Luc Lachance | 2002-12-04 20:24:53 | Re: 7.3 no longer using indexes for LIKE queries |