| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера