Re: "fix" for plpgsql polymorphism

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: "fix" for plpgsql polymorphism
Date: 2003-07-03 14:30:20
Message-ID: 21360.1057242620@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Joe Conway <mail(at)joeconway(dot)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

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Kim Ho 2003-07-03 17:17:57 JDBC Driver: Check for closed statement
Previous Message Jean-Michel POURE 2003-07-02 10:33:09 Re: Request for translation of pgAdmin3 into Norvegian