Re: Coalesce 2 Arrays - Mailing list pgsql-general

From Alex Magnum
Subject Re: Coalesce 2 Arrays
Date
Msg-id CA+cR4zfGq7wR2TnpVNs2oMDZOcvDnN2xX=8ZmMomTBzeuD28=A@mail.gmail.com
Whole thread Raw
In response to Re: Coalesce 2 Arrays  (Rob Sargent <robjsargent@gmail.com>)
Responses Re: Coalesce 2 Arrays
Re: Coalesce 2 Arrays
List pgsql-general
Yes, they are. 

On Tue, Jun 25, 2019 at 4:33 AM Rob Sargent <robjsargent@gmail.com> wrote:


On Jun 24, 2019, at 2:31 PM, Alex Magnum <magnum11200@gmail.com> wrote:

Hi,
I have two arrays which I need to combine based on the individual values;
i could do a coalesce for each field but was wondering if there is an easier way

array_a{a,   null,c,   d,null,f,null}  primary
array_b{null,2   ,null,4,5   ,6,null}  secondary
 
result {a,   2,   c,   d,5,   f,null)

Any advice would be appreciated

Are the inputs always of fixed dimensions eg. 1 by 7?

pgsql-general by date:

Previous
From: Brent Wood
Date:
Subject: Re: Need a DB layout gui
Next
From: Tim Clarke
Date:
Subject: Re: Need a DB layout gui