Re: proposal: plpgsql - iteration over fields of rec or row variable

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Merlin Moncure <mmoncure(at)gmail(dot)com>
Subject: Re: proposal: plpgsql - iteration over fields of rec or row variable
Date: 2010-11-09 17:40:23
Message-ID: AANLkTimhgf3hZBs92PMtNyv3cXrngEszhczXxTbx8od8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/11/9 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "David E. Wheeler" <david(at)kineticode(dot)com> writes:
>> You realize you can pretty much do all this with hstore, right?
>
> Yeah.  Anything that involves smashing all the fields to text is not
> really an advance over (a) hstore or (b) using plperl or one of the
> other weakly-typed PLs.
>
> I think there's a fairly fundamental contradiction involved here.
> One of the basic design attributes of plpgsql is that it's strongly
> typed.  Sometimes that's a blessing, and sometimes it's not, but
> it's a fact.  There really isn't a good way to deal with run-time
> field selection while still maintaining strong typing.  I do not
> believe that the answer to that problem is "so let's break strong
> typing".  Rather, the answer is that if that's what you need, you
> need to use a different tool.  There's a reason we support multiple
> PLs.

yes - I know these arguments well. But you have to know so any
combination of PL increase a project complexity and increase a price
for maintaining, installation, Now It's relative safe to say to
somebody - you need a plpgsql. But it's more difficult to say same
about plperl, pltcl, plpython - I like plperl too much, but I would to
use it for untrusted operation and not for some very simple and
general task.

Pavel

>
>                        regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2010-11-09 17:42:16 Re: proposal: plpgsql - iteration over fields of rec or row variable
Previous Message David E. Wheeler 2010-11-09 17:38:50 Re: proposal: plpgsql - iteration over fields of rec or row variable