Hi Paolo,

Why is postgresql set to having the timestamps set to "timestamp without
time zone"?

I am having issues doing some queries and wonder what might be a nfacctd
problem if I move the table to use timestamp WITH time zone.

as an aside:
here is an SQL issue I'm having problems with..

pmacct=> SELECT step.date,CAST(step.date as int),foo.mb FROM
(SELECT acct_v6.stamp_inserted,SUM(acct_v6.bytes) AS mb
FROM acct_v6 
WHERE as_src = '714'
GROUP BY stamp_inserted) AS foo
RIGHT OUTER JOIN (select '2009-10-26'::timestamp + i*'10 minute'::interval AS 
date FROM generate_series(0,144) AS i) AS step
ON (step.date=foo.stamp_inserted) ;
ERROR:  cannot cast type timestamp without time zone to integer
LINE 1: SELECT step.date,CAST(step.date as int),foo.mb FROM
                                           ^
pmacct=> 

(ie. I am trying to pull out each acct_v6.stamp_inserted and JOIN it
with a generated interval as i have set in $sql_history so I
can gnuplot a time-series)

Let me know if I can scrap this with something easier :)

Regards,
  C.
-- 
 Media Service Provider Ltd.
 http://blog.playlouder.com/
 http://as47998.net/
 020 7729 4797

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to