I have an MQTT node called "description" this node comes in as ASCII code from a PLC. The string node converts the ASCII code into a string value. I inserted debugs node so you can see how the message is moving. My function node has:
var query1 = "INSERT INTO testing (tech_name) VALUES ('" + msg.payload + "')";
msg.topic = "sql";
msg.payload = query1;
return msg;
I inserted a picture of the table I have in postgres and the data type the columns use. "tech_name" uses data type 'text' which should accept string values. I keep getting the error "error: invalid message format" even though I am using a string value