avg() for timestamp
От
Neil Conway
Тема
avg() for timestamp
Дата
Msg-id
404A8E0C.6080609@samurai.com
Список
Дерево обсуждения
avg() for timestamp Neil Conway <neilc@samurai.com>
Re: avg() for timestamp Bruno Wolff III <bruno@wolff.to>
Re: avg() for timestamp Tom Lane <tgl@sss.pgh.pa.us>
Re: avg() for timestamp Tom Lane <tgl@sss.pgh.pa.us>
It seems to me the following should Just Work: nconway=# create table t1 (a timestamp); CREATE TABLE nconway=# insert into t1 values (now()); INSERT 17164 1 nconway=# insert into t1 values (now()); INSERT 17165 1 nconway=# insert into t1 values (now()); INSERT 17166 1 nconway=# insert into t1 values (now()); INSERT 17167 1 nconway=# select avg(a) from t1; ERROR: function avg(timestamp without time zone) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. It seems we could add the necessary aggregate function to do this. Seems worth doing to me. Any comments? -Neil
В списке pgsql-hackers по дате отправления