Re: ODBC int2 parameters to pg function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ODBC int2 parameters to pg function
Дата
Msg-id 8315.1079224814@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ODBC int2 parameters to pg function  (Gary Doades <gpd@cwcom.net>)
Ответы Re: ODBC int2 parameters to pg function  ("Gary Doades" <gpd@gpdnet.co.uk>)
Список pgsql-odbc
Gary Doades <gpd@cwcom.net> writes:
> I have delcared a pg function as:
> function GENERATE_TIMESHEETS(timestamp,timestamp,smallint,smallint)
> ....

You're probably best off to declare the inputs as integer not smallint.
Integer literals are assumed to be int4 by default, and since there's
no implicit downcast to int2 (anymore), writing a function this way will
require you to cast to smallint explicitly a lot.  It's seldom worth
that notational hassle.  You can cast inside the function if you really
need the values to be int2 inside it.

            regards, tom lane

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

Предыдущее
От: "David P. Lurie"
Дата:
Сообщение: Access 2002 and psqlodbc 7.03.02
Следующее
От: Shachar Shemesh
Дата:
Сообщение: Re: ERROR: column "ctid" does not exist