Search Postgresql Archives

Postgresql is not able to find a stored procedure with a smallint instead of integer in signature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux