Re: plpgsql: How to modify a field in an array of records

From: Dirk Mika <Dirk(dot)Mika(at)mikatiming(dot)de>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: plpgsql: How to modify a field in an array of records
Date: 2019-07-03 04:53:28
Message-ID: 4627FE02-5C71-4C98-8555-4E3E3ADD68DD@mikatiming.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


--
Dirk Mika
Software Developer

mika:timing GmbH
Strundepark - Kürtener Str. 11b
51465 Bergisch Gladbach
Germany

fon +49 2202 2401-1197
dirk(dot)mika(at)mikatiming(dot)de
www.mikatiming.de

AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884
Geschäftsführer: Harald Mika, Jörg Mika

## How2Use
## the ChampionChip by mika:timing
## https://youtu.be/qfOFXrpSKLQ
Am 02.07.19, 15:53 schrieb "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

Yeah, that seems like it ought to work, and ideally it would. But plpgsql
doesn't currently have support for nested field-of-array-element or
element-of-record-field assignments. (I've looked briefly at this in the
past, and it doesn't seem impossible, but it's definitely not trivial
either.)

Ah, that explains the error message, of course. And I thought it was actually a matter of correct syntax. :-)

You'll have to do some kind of workaround like assigning the whole array
element to a temp variable, fixing the field in the temp variable, then
assigning back :-(

I tried that and it seemed to work. There is no error message and the function seems to do the right thing. ;-)

Dirk

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dirk Mika 2019-07-03 05:04:33 Re: plpgsql: How to modify a field in an array of records
Previous Message raf 2019-07-02 23:38:41 Re: plpgsql: How to modify a field in an array of records