Re: [GENERAL] Weird query sort

2008-12-27 Thread Tom Lane
"Jeffrey Melloy" writes: > It seems like I should be able to order by quer_time desc and then > query_time asc. Am I missing something? You'd have to do it *after* the join and GROUP BY if you want it to control the input to the aggregate reliably. Either of those operations will feel free to ou

[GENERAL] Weird query sort

2008-12-27 Thread Jeffrey Melloy
I have a table, queries, with a column value. There is a trigger on this table that inserts into query_history for each update to value. I'm trying to graph the query_history table, so I was using a custom aggregate to turn it into an array: CREATE AGGREGATE array_accum (anyelement) ( sfunc = arr