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
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq