Skip to content

Instantly share code, notes, and snippets.

@qrilka
Created June 10, 2011 12:44
Show Gist options
  • Save qrilka/1018772 to your computer and use it in GitHub Desktop.
Save qrilka/1018772 to your computer and use it in GitHub Desktop.
mososm2=# select * from object where id=43;
id | type_id | tracker_id | last_event_id | last_fail_event_id | last_fix_event_id | has_connect | last_alarm_event_id | script_version | last_voltage
----+---------+------------+---------------+--------------------+-------------------+-------------+---------------------+----------------+--------------
43 | 1 | 27 | 4455692 | 4411048 | 4455692 | t | | TT2309 | 12.8932
(1 row)
mososm2=# select * from object where id=43;
id | type_id | tracker_id | last_event_id | last_fail_event_id | last_fix_event_id | has_connect | last_alarm_event_id | script_version | last_voltage
----+---------+------------+---------------+--------------------+-------------------+-------------+---------------------+----------------+--------------
43 | 1 | 27 | 4455692 | 4411048 | 4455692 | t | | TT2309 | 12.8932
(1 row)
mososm2=# select * from object where id=43;
id | type_id | tracker_id | last_event_id | last_fail_event_id | last_fix_event_id | has_connect | last_alarm_event_id | script_version | last_voltage
----+---------+------------+---------------+--------------------+-------------------+-------------+---------------------+----------------+--------------
43 | 1 | 27 | 4455692 | 4411048 | 4455692 | f | | TT2309 | 12.8932
(1 row)
mososm2=# select * from object_event where object_id=43 order by datetime desc limit 1;
mososm2=# select * from object where id=43;
id | type_id | tracker_id | last_event_id | last_fail_event_id | last_fix_event_id | has_connect | last_alarm_event_id | script_version | last_voltage
----+---------+------------+---------------+--------------------+-------------------+-------------+---------------------+----------------+--------------
43 | 1 | 27 | 4455692 | 4411048 | 4455692 | t | | TT2309 | 12.8932
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment