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

Поиск
Список
Период
Сортировка
От David Gagnon
Тема Postgresql is not able to find a stored procedure with a smallint instead of integer in signature
Дата
Msg-id 42CDCD02.9060200@siunik.com
обсуждение исходный текст
Ответ на Re: A trigger that acts on a column with a given column name  (BigSmoke <bigsmoke@gmail.com>)
Ответы Why UPDATE gl SET gl.glnum = gl.glnum; cause error when UPDATE gl SET glnum = glnum; is OK ?  (David Gagnon <dgagnon@siunik.com>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Jamie Deppeler
Дата:
Сообщение: Re: Looking for a good ERD Tool
Следующее
От: Paul McGarry
Дата:
Сообщение: Full outer join question.