Hello
PostgreSQL hasn't a timediff function and hasn't a session variables.
You can see how can be implemented this function in pg
http://okbob.blogspot.com/2009/08/mysql-functions-for-postgresql.html.
If you can compare values from different rows, you have to have a pg
>= 8.4 with window function
Hello
I have the next query in mysql to get the time difference from two rows, but
I would like to implement it in postgres, but I'm getting some errors when I
try to query it.
select speed,mobile,date,
timediff(@nexttime,date) as tdiff2, (@nexttime:=date) as Next
from positions
where speed=0 an