From: | David Gagnon <dgagnon(at)siunik(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Postgresql is not able to find a stored procedure with a smallint instead of integer in signature |
Date: | 2005-07-08 00:46:58 |
Message-ID: | 42CDCD02.9060200@siunik.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I messed around with the following problem and just want to let you know.
I have the following function:
- CREATE OR REPLACE FUNCTION
usp_inventaire_transaction_inserer("varchar", "varchar", int2,
"varchar", "varchar", "varchar", int4, "timestamp", "timestamp",
"numeric", "numeric", "varchar", "varchar", "varchar", "varchar",
"varchar", "timestamp")
If I explicitly cast the third argument to a smallint the function is found.
select * from usp_Inventaire_Transaction_Inserer('10000000', 'M',
3::INT2, 'S', 'toto', 'EN', 2,'2005-07-07', '2005-07-07', 0.0, 0.0,
'','', '', '', '', '2005-07-07');
If I remove the cast I got the followin error.
select * from usp_Inventaire_Transaction_Inserer('10000000', 'M', 3,
'S', 'toto', 'EN', 2,'2005-07-07', '2005-07-07', 0.0, 0.0, '','', '',
'', '', '2005-07-07');
ERROR: function usp_inventaire_transaction_inserer("unknown",
"unknown", integer, "unknown", "unknown", "unknown", integer, "unknown",
"unknown", numeric, numeric, "unknown", "unknown", "unknown", "unknown",
"unknown", "unknown") does not exist
HINT: No function matches the given name and argument types. You may
need to add explicit type casts.
It seems Postgresql has problem guessing that 3 may fit in a small int.
I this an error? Anyway it's just to let you know since I replace the
smallint with an integer and everything works fine:-)
Have a great day
/David
From | Date | Subject | |
---|---|---|---|
Next Message | Paul McGarry | 2005-07-08 01:22:39 | Full outer join question. |
Previous Message | Jamie Deppeler | 2005-07-08 00:28:29 | Re: Looking for a good ERD Tool |