From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, depesz(at)depesz(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Dyamic updates of NEW with pl/pgsql |
Date: | 2010-03-12 18:59:27 |
Message-ID: | 162867791003121059x454713faxf21b663dd56ca9a9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/3/12 strk <strk(at)keybit(dot)net>:
> On Fri, Mar 12, 2010 at 10:47:45AM -0800, David Fetter wrote:
>> On Fri, Mar 12, 2010 at 07:35:41PM +0100, Pavel Stehule wrote:
>> > 2010/3/12 David Fetter <david(at)fetter(dot)org>:
>> > >
>> > > This is, by the way, an excellent argument for including hstore in
>> > > core in 9.1. :)
>> >
>> > I like it - but it looking little bit strange - I thinking we need
>> > only one function (maybe with some special support from pl executor)
>> >
>> > begin
>> > update_field(NEW, 'field', value);
>> > ....
>>
>> This doesn't seem like a terribly useful addition, it being specific
>> to PL/pgsql. Then there's the quoting issue, which the above doesn't
>> quite address. Putting hstore in would let all the other PLs use it,
>> to the extent that they need such a thing. :)
>
> Plus pure SQL use !
> I was considering using hstore for a table value too for
> a form of "historic table". Just to say I'd also be happy with
> it being core in pgsql :)
>
I see some disadvantages
a) non intuitive name - hstore is very specific name
b) effectivity (mainly inside trigger body) - plpgsql specific
construct can be 10x faster.
I would to see hash tables in core too, but I don't think so it is
good solution for record updating.
Regards
Pavel
> --strk;
>
> () Free GIS & Flash consultant/developer
> /\ http://strk.keybit.net/services.html
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-03-12 19:10:00 | Re: Server crash with older tzload library |
Previous Message | Tom Lane | 2010-03-12 18:57:02 | Re: Server crash with older tzload library |