Error when I try to INSERT INTO #41
-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Bonjour,
Check your PostgreSQL logs, which should have more details about the wrong request received. In general for debugging, I suggest you try your query by hand directly in psql or pgAdmin. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
In addition to missing the single quotes around your strings, it looks like you did not refer to the right object. When in doubt, you can also skip completely the templating and generate the full query completely by hand, referring to it via |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
In addition to missing the single quotes around your strings, it looks like you did not refer to the right object.
In your case, I believe it should be something like
'{{{msg.payload.device}}}'
Check the doc https://github.com/alexandrainst/node-red-contrib-postgresql/blob/main/README.md
When in doubt, you can also skip completely the templating and generate the full query completely by hand, referring to it via
{{{ msg.payload }}}