Re: select fails inside function, but works otherwise

Поиск
Список
Период
Сортировка
От Daniel Wickstrom
Тема Re: select fails inside function, but works otherwise
Дата
Msg-id 15030.26360.260316.532372@gargle.gargle.HOWL
обсуждение исходный текст
Ответ на Re: select fails inside function, but works otherwise  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

    Tom> 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;

    Tom> Try distinguishing the field names from the plpgsql variable
    Tom> names.  I believe the machine is seeing this as a command to
    Tom> select the current values of the plpgsql variables (ie, two
    Tom> NULLs) into those same variables.  IIRC, unqualified names
    Tom> will be matched first to plpgsql variables and only second to
    Tom> fields of the query tables.

That was the problem.


Thanks,

Dan

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

Предыдущее
От: Jan Ploski
Дата:
Сообщение: Re: concurrent updates problem
Следующее
От: Rick Delaney
Дата:
Сообщение: Accessing serials through rules