Re: "fix" for plpgsql polymorphism

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "fix" for plpgsql polymorphism
Дата
Msg-id 21360.1057242620@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: "fix" for plpgsql polymorphism  (Joe Conway <mail@joeconway.com>)
Re: "fix" for plpgsql polymorphism  (Joe Conway <mail@joeconway.com>)
Список pgsql-patches
Joe Conway <mail@joeconway.com> writes:
> Tom Lane wrote:
>> I'm not excited about picking a notation for the long term on the
>> grounds that it takes the least code to implement today.

> I knew you wouldn't be ;-)

>> I admit I have not got a clearly-better solution in my hip pocket,
>> but "$0" is just rubbing my design sense the wrong way.

> Yeah, me too, but then I didn't particularly like plpgsql's $1, $2, ...
> notation for arguments at first either. If we had named arguments, then
> this wouldn't even be a consideration in my mind, but given that we
> don't, I still think it is the best choice.

> You can alias $0, similar to the argument variables. And, I confirmed
> that you cannot change the value, similar to the argument variables:

Perhaps you shouldn't mark it isconst; then it would actually have some
usefulness (you could use it directly as a temporary variable to hold
the intended result).  I can't see much value in aliasing it if it's
const, either.

            regards, tom lane

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

Предыдущее
От: sumit
Дата:
Сообщение: Re: UPDATED Patch for adding DATACUBE operator
Следующее
От: Joe Conway
Дата:
Сообщение: Re: "fix" for plpgsql polymorphism