Re: print SQL data in log file
Posted:
Sun Sep 13, 2015 4:11 pm
by autolog
Follow up to the previous post, the working SQL now looks like this:
- Code: Select all
SQL command= /Library/PostgreSQL/bin/psql indigo_history postgres -c "SELECT id, to_char(ts,'YYYY-mm-dd-HH24:MI:ss'),value from variable_history_94014379 order by ID LIMIT 100 OFFSET (SELECT COUNT(*) FROM variable_history_94014379)-100;"
That's all for today (as it is 23:10 in the UK) - I'll check in again tomorrow morning
print SQL data in log file
Posted:
Sun Sep 13, 2015 4:41 pm
by kw123
v 0-8-2
"order by id"
that is now in the plugin, I ran it - it gives no syntax error and prints sorted rows. But i can not test if it works for you or with a non sorted id column.
I added a field in config to switch "order by id" on/off
the default is off, as it can take a lot of cpu to go through a large db
Karl
Re: print SQL data in log file
Posted:
Mon Sep 14, 2015 11:24 am
by kw123
version 0.9.1 posted on first page:
added:
- you can add a section condition for state 0 i.e. equal or not equal to e.g. on or off or 55
- added some more checks to make sure the query does not get too big, and the log file does not get killed. i.e. number of records must be <= 1000 for printing to log file
Karl
Re: print SQL data in log file
Posted:
Mon Sep 14, 2015 1:59 pm
by autolog
Installed and working OK - like the new features
Re: print SQL data in log file
Posted:
Mon Sep 14, 2015 4:07 pm
by kw123
Nothing new for the next 3 weeks... But if you have ideas let me know.
Sent from my iPhone using Tapatalk
Re: print SQL data in log file
Posted:
Thu Oct 08, 2015 4:42 pm
by kw123