Paolo Tavalazzi <ptavalazzi@charta.it> writes:
> I have applied the procedure for fixing pg_statistic as you had said, but the result is the same!
Hm. It could be a planner bug. Can you reproduce the misbehavior if
you dump and load the tables into a fresh database? If so, could you
send me the dump so I can look at the problem with a debugger?
(Also, you might try updating to 7.4.2 first and see if that changes
anything. We did fix quite a number of bugs already in 7.4.2...)
> Another question, in 7.4 GROUP BY clause not guarantee the ordering of result.
> Can I desable the new group by algorithm to maintain the coherence whit the programs that I have in production with
pg_7.3
As Bruno said, your programs are broken because they are assuming
something not guaranteed by the SQL spec. But until you get around to
adding the ORDER BY clauses they should have, see enable_hashagg.
regards, tom lane