Smallint needs explicit cast in psql?

Поиск
Список
Период
Сортировка
От Matt Musgrove
Тема Smallint needs explicit cast in psql?
Дата
Msg-id C0FE28B9352B6F4F8CE371643EC3B25121082449@EFJDFWMB01.EFJDFW.local
обсуждение исходный текст
Ответы Re: Smallint needs explicit cast in psql?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice

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

 

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

Предыдущее
От: Tom Burns
Дата:
Сообщение: Fw: Selecting Fields in Union in Subquery
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Smallint needs explicit cast in psql?