Re: [GENERAL] Questions about setting an array element value outside of the update

2011-12-04 Thread Tom Lane
David Johnston writes: >> Is here less clumsy way to set array[position] to the new_value (not update >> but just change an element inside an array) than: >> >> SELECT >> _array[1:pos-1] >> ||newval >> ||_array[_pos+1:array_length(_array, 1)] > I do not know if there is a cleaner way but regar

Re: [GENERAL] Questions about setting an array element value outside of the update

2011-12-04 Thread David Johnston
On Dec 4, 2011, at 22:43, Maxim Boguk wrote: > Lets say i have subquery which produce array[], position and new_value > > Is here less clumsy way to set array[position] to the new_value (not update > but just change an element inside an array) than: > > SELECT >_array[1:pos-1] >

[GENERAL] Questions about setting an array element value outside of the update

2011-12-04 Thread Maxim Boguk
Lets say i have subquery which produce array[], position and new_value Is here less clumsy way to set array[position] to the new_value (not update but just change an element inside an array) than: SELECT _array[1:pos-1] ||newval ||_array[_pos+1:array_length(_array, 1)] FR