From a22631988551fcac1d5249830dc79fe48e534760 Mon Sep 17 00:00:00 2001
From: Kris Daniels This node can be used to write and read from a Postgres database To receive the results from a query, simply set the outputs to 1 and connect a node The msg.payload on the output will be a json array of the returned records Insert exampleb>msg.payload = { 'sensorid': 1, 'value': 2 }
insert into table (field1, field2) values ($sensorid, $value)+ + +
Select exampleb>
+msg.payload = { 'sensorid': 1, 'value': 2 }+
select * from table where field1=$sensorid order by time desc limit 1+