I haven't done the work yet to add a column to pg_aggregate, so thisjust knows about optimizing a couple of hard-wired cases (int4 andtext). Other than that it's reasonably complete, I think. Comments?
regards, tom lane