# Storage Nodes

# Postgres

Postgres node is Kumologica node allowing basic access to Postgres database. Postgres sets up a console to execute queries against the configured database.

The msg.payload will contain the result object of the query. It has the following properties:

command: The sql command that was executed (e.g. "SELECT", "UPDATE", etc.) rowCount: The number of rows affected by the SQL statement oid: The oid returned rows: An array of rows

Postgres implements a template engine allowing parameterized queries.

/* INTEGER id COLUMN */ SELECT * FROM table WHERE id = [[ msg.id ]] /* VARCHAR id COLUMN*/ SELECT * FROM table WHERE id = '[[ msg.id ]]'

The node expect host, port, and database url as the input.

Example: How to use the postgres node.