People from brazilian postgresql list sent me another way to sort the
column contents. The way is the aggregate accumulate values and after
run an array sort function. It worked fine. I think the subquery in
function f_select_array does not decrease performance. Follow the
code:
--from http://arc
Thanks a lot the explanation.
I tested all cases and I noticed that reordering the source table (city)
not works on all cases, so I think Postgresql perform different internal
sort to optimize some query's.
I noticed this in other query I performed:
select s.ano,
s.semestre,
It works fine. But I wouldn't like using subselect's, then if somebody else
knows about an operator or something like that to put on the aggregator,
please tell me.
I think the nature of the f_concat makes it difficult to sort, since it
simply adds the next value, so if the source table gives
It works fine. But I wouldn't like using subselect's, then if somebody else
knows about an operator or something like that to put on the
aggregator, please tell me.
Volkan YAZICI escreveu:
On May 02 06:00, Everton Luís Berz wrote:
Is it possible to sort the content of an aggregate text co
On Wed, May 03, 2006 at 00:13:40 +0300,
Volkan YAZICI <[EMAIL PROTECTED]> wrote:
> On May 02 06:00, Everton Luís Berz wrote:
> > Is it possible to sort the content of an aggregate text column?
> >
> > Query:
> > select s.name, ag_concat(c.name) from state s
> > inner join city c on (c.idstate =
On May 02 06:00, Everton Luís Berz wrote:
> Is it possible to sort the content of an aggregate text column?
>
> Query:
> select s.name, ag_concat(c.name) from state s
> inner join city c on (c.idstate = s.idstate)
> group by s.name
> order by s.name;
IMHO, you can receive results ordered by using
Is it possible to sort the content of an aggregate text column?
Query:
select s.name, ag_concat(c.name) from state s
inner join city c on (c.idstate = s.idstate)
group by s.name
order by s.name;
Result:
name | ag_concat
---+---
RS| Porto Alegre, Gramado
SP