Re: Returning setof records

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: "Scott Schulthess"
Дата:
Сообщение: Re: Returning setof records
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [Slony1-general] "Blueprints for High Availability"