Re: How best to turn select result into options like 'a|b|c'' - Mailing list pgsql-general

From Ray O'Donnell
Subject Re: How best to turn select result into options like 'a|b|c''
Date
Msg-id 17dd9f16258.2834.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie
Whole thread Raw
In response to How best to turn select result into options like 'a|b|c''  (Shaozhong SHI <shishaozhong@gmail.com>)
Responses Re: How best to turn select result into options like 'a|b|c''
List pgsql-general
On 20 December 2021 22:10:19 Shaozhong SHI <shishaozhong@gmail.com> wrote:
Is there a way to turn select result into something like 'a|b|c' .
Regards,
David

On my phone so hard to reply properly, but if a, b and c are in separate rows then you need the array_agg() and array_to_string() functions.

Ray.

pgsql-general by date:

Previous
From: Shaozhong SHI
Date:
Subject: How best to turn select result into options like 'a|b|c''
Next
From: "David G. Johnston"
Date:
Subject: Re: How best to turn select result into options like 'a|b|c''