Create data in postgres

hello, I am using the node red for the first time, I try to stock data in postgresql.
I currently need to find a solution, but nothing works, can you tell me what i do wrong ?


function insert:

The first thing you need to do is tell us what you have tried

I started with a simple program but it didn't work


nothing is displayed in my postgres

What node is it. Have you read the built in help? Have you read the readme for that node?

I ask because many of the SQL nodes expect the query to be in topic.

i used the node-red-contrib-postgrestor-next biblio.
must I add a function or something like that ?
if anyone has already send data to postgres, can you share with me your code ?

What settings do you have in the node-red-contrib-postgrestor-next node?

here is my node's setting


I tried node-red-contrib-re-postgres biblio, same prob

So is Postgres installed on the same device that node-red is?

yes, on the same device.. do i should add something else ?

I just wanted to make sure it was on the same device. Now what is your query?
Have you read the nodes read me?

I found where is the problem, the code should be inserted inside the potgres node
My query is like that:
msg.params = ['{{payload.id}}', '{{payload.value}}']
return msg;

Congradulations!!

yhank you but it didn't work with multiple inputs

There is no point saying that unless you show us what doesn't work and in what way it doesn't work.

I serve the problem, thank you all

Hai... have you solved it ?
if you don't mind please what you have done to solved it..
i have the same issue.. thanks