Re: range_agg
От | Paul A Jungwirth |
---|---|
Тема | Re: range_agg |
Дата | |
Msg-id | CA+renyW9E4eCA0p6n6-LgPDzFmEp2asG0cg2USr8G2hL_iG5og@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: range_agg (Jeff Davis <pgsql@j-davis.com>) |
Список | pgsql-hackers |
On Tue, Jul 9, 2019 at 12:02 PM Jeff Davis <pgsql@j-davis.com> wrote: > > - Multirange in/out work just like arrays, e.g. '{"[1,3)", "[5,6)"}' > > It would be cool to have a better text representation. We could go > simple like: > > '[1,3) [5,6)' Will that work with all ranges, even user-defined ones? With a tstzrange[] there is a lot of quoting: =# select array[tstzrange(now(), now() + interval '1 hour')]; array --------------------------------------------------------------------------- {"[\"2019-07-09 12:40:20.794054-07\",\"2019-07-09 13:40:20.794054-07\")"} I'm more inclined to follow the array syntax both because it will be familiar & consistent to users (no need to remember any differences) and because it's already built so we can use it and know it won't have gotchas. > I think "complement" might be a better name than "inverse". > > m1 - m2 = m1 * complement(m2) > > What about "~"? That seems like the right term and a good symbol. Paul
В списке pgsql-hackers по дате отправления: