| От | Tom Lane |
|---|---|
| Тема | Re: select fails inside function, but works otherwise |
| Дата | |
| Msg-id | 20965.985031544@sss.pgh.pa.us обсуждение |
| Ответ на | select fails inside function, but works otherwise (Daniel Wickstrom <danw@rtp.ericsson.se>) |
| Ответы |
Re: select fails inside function, but works otherwise
|
| Список | pgsql-general |
Daniel Wickstrom <danw@rtp.ericsson.se> writes:
> -- This select is failing. It does not return the correct value
> -- when object_id = 44
> select context_id, security_inherit_p
> into context_id, security_inherit_p
> from acs_objects
> where object_id = check_path__object_id;
Try distinguishing the field names from the plpgsql variable names.
I believe the machine is seeing this as a command to select the current
values of the plpgsql variables (ie, two NULLs) into those same
variables. IIRC, unqualified names will be matched first to plpgsql
variables and only second to fields of the query tables.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера