Re: Review: listagg aggregate

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Review: listagg aggregate
Дата
Msg-id 407d949e1001281057p2d22a934gf8a89f4824ec9202@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Review: listagg aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
<p>One situation where this could actually matter in the long term is if we want to have an optimization for aggregate
functionswhose state variables can be combined. this could be important if we ever want to do parallel processing
someday.<p>Sowe could have, for example two subjobs build two sublists and then combiner the two lists later. in that
casethe separator might not be the one the user expected - our put another way the one the user expected might not be
availablewhen we need it.<p>We could say this isn't a problem because not all aggregate functions will be amenable to
suchan optimization and perhaps this will just be one of them. Alternately we could just have faith that a solution
willbe found - it doesn't seem like it should be an insoluble problem to me.<p>greg<p><blockquote type="cite">On 28 Jan
201015:57, "Tom Lane" <<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>> wrote:<br /><br /><p><font
color="#500050">RobertHaas <<a href="mailto:robertmhaas@gmail.com">robertmhaas@gmail.com</a>> writes:<br /> >
OnThu, Jan 28, 2010 at 9:01 AM, Pavel Stehule <pavel....</font>Yeah.  The real issue here is that in some cases
you'dlike to have<br /> non-aggregated parameters to an aggregate, but SQL has no notation<br /> to express that.<br
/><br/> I think Pavel's underlying complaint is that if the delimiter<br /> argument isn't constant, then we're
exposingan implementation<br /> dependency in terms of just which values get separated by which<br /> delimiters.  The
mostpractical implementation seems to be that<br /> the first-call delimiter isn't actually used at all, and on<br />
subsequentcalls the delimiter *precedes* the associated value,<br /> which is a bit surprising given the order in which
onewrites<br /> them.  Not sure if this is worth documenting though.  Those two<br /> or three people who actually try
itwill figure it out soon enough.<br /><br />                        regards, tom lane<br /><p><font
color="#500050"><br/>-- <br />Sent via pgsql-hackers mailing list (<a
href="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br/>To make changes to your
subs...</font></blockquote>

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Streaming replication, and walsender during recovery
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Streaming replication, and walsender during recovery