Re: BUG #4585: out parameter name cuases disruption in custom aggregate?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4585: out parameter name cuases disruption in custom aggregate?
Дата
Msg-id 16570.1229466122@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4585: out parameter name cuases disruption in custom aggregate?  ("robert treat" <xzilla@users.sourceforge.net>)
Список pgsql-bugs
"robert treat" <xzilla@users.sourceforge.net> writes:
> Apparently the assignment of the integer value is somehow dependent on the
> name of the out parameter; when it matches the column name, you get nulls
> back.  Is this a bug?

No, it's expected behavior.  You're "accumulating" n copies of the
current value of the parameter variable, which is null because you've
not yet assigned anything to it.

The real issue here is that an unqualified name is matched against
plpgsql variables before considering names coming from the SQL query.
See previous pghackers discussions about changing that, and the massive
breakage of user code that would doubtless ensue :-(

            regards, tom lane

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

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: BUG #4585: out parameter name cuases disruption in custom aggregate?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4582: Renaming sequences and default value