Re: Aggregates with non-commutative transition functions
| От | Tom Lane |
|---|---|
| Тема | Re: Aggregates with non-commutative transition functions |
| Дата | |
| Msg-id | 2214.1045181458@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Aggregates with non-commutative transition functions (Emmanuel Charpentier <charpent@bacbuc.dyndns.org>) |
| Ответы |
Re: Aggregates with non-commutative transition functions
|
| Список | pgsql-general |
Emmanuel Charpentier <charpent@bacbuc.dyndns.org> writes:
> In other words, may I guarantee that :
> select recnum, glue(linenum)as authors from (select recnum, linenum, author
> from cit_authors where <some conditions on recnum> order by recnum,
> linenum) as foo;
> will indeed give me the authors in the original order ?
The query as given is illegal; you'd need to add "GROUP BY recnum" to
the outer query to make it legal. And once you do that, I don't think
you can rely on the ordering of the rows.
This problem has been discussed before, and I think we came up with some
workaround for it, but I don't have time to go trolling the archives for
the solution at the moment.
regards, tom lane
В списке pgsql-general по дате отправления: