Re: How to set array element to null value - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: How to set array element to null value
Date
Msg-id e1e65265-77f9-4c55-918e-d64d632cdc20@gmx.net
Whole thread Raw
In response to How to set array element to null value  (Brahmam Eswar <brahmam1234@gmail.com>)
List pgsql-general
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)



pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: How to set array element to null value
Next
From: Łukasz Jarych
Date:
Subject: Create event triger