public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Brent Wood <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: concatenating hstores in a group by?
Date: Sun, 19 Jan 2025 11:44:53 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwasxOzkA-BECEaOz1b8EOh2hGaEfcG3JHquL-eDJkSrMQ@mail.gmail.com>
References: <CH2PR01MB5765698BB9F71CEB662D5AE4AD1B2@CH2PR01MB5765.prod.exchangelabs.com>
<[email protected]>
<SY7P300MB0761A579730344B2813CA07DA11B2@SY7P300MB0761.AUSP300.PROD.OUTLOOK.COM>
<CAKFQuwasxOzkA-BECEaOz1b8EOh2hGaEfcG3JHquL-eDJkSrMQ@mail.gmail.com>
"David G. Johnston" <[email protected]> writes:
> On Friday, January 17, 2025, Brent Wood <[email protected]> wrote:
>> I want to concatenate the hstores,
> There are no hstore aggregate functions.
It would be trivial to make a user-defined one.
More or less (untested)
create aggregate hstore_agg(hstore)
(
sfunc = hs_concat,
stype = hstore
);
Either way though, the order of aggregation is unspecified and thus
it's unclear which input will win when there are duplicate keys.
If that matters then you'll need to think about how you want
to resolve it.
regards, tom lane
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: concatenating hstores in a group by?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox