From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to set array element to null value
Date: Mon, 9 Jul 2018 12:29:44 +0200
Message-ID: <e1e65265-77f9-4c55-918e-d64d632cdc20@gmx.net> (raw)
In-Reply-To: <CA+wLFo03Wp6sg8xWp+FyCFKW+5ec3kJ8uVz_Y3akEKyF5nRO4w@mail.gmail.com>
References: <CA+wLFo03Wp6sg8xWp+FyCFKW+5ec3kJ8uVz_Y3akEKyF5nRO4w@mail.gmail.com>
Brahmam Eswar schrieb am 09.07.2018 um 11:58:
> I'm trying to reset array element to null. but 3rd line of below snippet is giving the compilationĀ error.
>
>
> FOR indx_1 IN array_lower(X, 1)..array_upper(X, 1) LOOP
> IF X[indx_1].REFERENCE_VALUE = 'ABC' THEN
> X[indx_1].REFERENCE_VALUE:='';
> END IF;
> END LOOP;
What data type is X exactly? It looks like a composite record type.
(Also: an empty string '' is not the same as NULL)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: How to set array element to null value
In-Reply-To: <e1e65265-77f9-4c55-918e-d64d632cdc20@gmx.net>
References: <CA+wLFo03Wp6sg8xWp+FyCFKW+5ec3kJ8uVz_Y3akEKyF5nRO4w@mail.gmail.com> <e1e65265-77f9-4c55-918e-d64d632cdc20@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox