| От | Tom Lane |
|---|---|
| Тема | Re: Returning setof records |
| Дата | |
| Msg-id | 25010.1137776827@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Returning setof records ("Scott Schulthess" <scott@topozone.com>) |
| Список | pgsql-admin |
"Scott Schulthess" <scott@topozone.com> writes:
> :( I realize it often automatically converts, and I've tried using
> varchar and char for the state column, as well as int4, integer, and int
> for the other columns.
[ looks again... ] Oh, wait, you're getting caught by a standard
plpgsql gotcha:
> create function placenamesearch(place text, state integer, county text,
^^^^^
> FOR myview IN SELECT featurename, countyname, state, featuretype,
^^^^^
plpgsql variable names win out over table column names, so what's coming
back in the SELECT result's third column is the integer "state"
parameter.
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера