Re: plpgsql: How to modify a field in an array of records - Mailing list pgsql-general

From Dirk Mika
Subject Re: plpgsql: How to modify a field in an array of records
Date
Msg-id 4627FE02-5C71-4C98-8555-4E3E3ADD68DD@mikatiming.de
Whole thread Raw
In response to Re: plpgsql: How to modify a field in an array of records  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
--
Dirk Mika
Software Developer

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

fon +49 2202 2401-1197
dirk.mika@mikatiming.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@sss.pgh.pa.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


pgsql-general by date:

Previous
From: raf@raf.org
Date:
Subject: Re: plpgsql: How to modify a field in an array of records
Next
From: Dirk Mika
Date:
Subject: Re: plpgsql: How to modify a field in an array of records