On Wed, 2005-03-09 at 13:03, Paul J Stevens wrote: > Hans Kristian Rosbach wrote: > > create index idx_test on dbmail_messages (mailbox_idnr, status, > > count(message_idnr)); > > This won't work, of course. > > sh-3.00$ psql dbmail > Welcome to psql 7.4.6, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help on internal slash commands > \g or terminate with semicolon to execute query > \q to quit > > dbmail=# create index idx_test on dbmail_messages (mailbox_idnr, status, > dbmail(# count(message_idnr)); > ERROR: cannot use aggregate function in index expression > > > A recent discussion shows fixing this is on the TODO list for postgresql. >
Ahh, of course not. Ohwell, it was worth a shot =) -HK
