diff --git a/storage/postgres/110-postgresout.html b/storage/postgres/110-postgresout.html index ab3291cc..4e984f5a 100644 --- a/storage/postgres/110-postgresout.html +++ b/storage/postgres/110-postgresout.html @@ -78,6 +78,16 @@

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

+