Does psql require smallints to be explicitly cast as such? If so then where is this documented? If not then what am I doing wrong? J
Given the simplest test case I could think of:
CREATE OR REPLACE FUNCTION test_issue(
parm smallint
) RETURNS VOID AS $$
BEGIN
RETURN;
END;
$$ LANGUAGE plpgsql;
nms=# \df test_issue
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+------------+------------------+---------------------+--------
public | test_issue | void | parm smallint | normal
(1 row)
nms=# select test_issue(1);
ERROR: function test_issue(integer) does not exist
LINE 1: select test_issue(1);
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Matthew Musgrove
EF Johnson Technologies, Inc.
Senior Design Engineer
O 972.819.2357
F 972.819.0639
E mmusgrove@efji.com