# Connection Node-RED to postgreSQL server

**URL:** <https://discourse.nodered.org/t/connection-node-red-to-postgresql-server/43619>\
**Category:** Dashboard\
**Created:** [3 April 2021 22:09 UTC](https://discourse.nodered.org/t/connection-node-red-to-postgresql-server/43619 "2021-04-03T22:09:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tboekhorst](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@tboekhorst](https://discourse.nodered.org/u/tboekhorst)\
**Post date:** [3 April 2021 22:09 UTC](https://discourse.nodered.org/t/connection-node-red-to-postgresql-server/43619/1 "2021-04-03T22:09:38Z")

</div>

**Hello everyone,**

_This will be my very first post!_  
I want to connect Node-RED to a PostgreSQL server and for test reasons just create a table into the database. However, after configuration, I am not able to create a table. It doesn't show anything. The output on the right of the picture is from the first msg.payload. After the PostgreSQL node there is no output.

_In the pictures below I will show you the configurations:_  
Node-RED view:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6bbd18a5a22a70960c7aaf862c1e6e379a1bdd67.png)

**Inject node:**

```auto
msg.payload = CREATE TABLE student(intCarrierId INT PRIMARY KEY, intBatchId INT);

```

**Function:**

```auto
msg.queryParameters = msg.payload;
return msg;

```

**Localhost PostgreSQL Server**  
Password: 1205

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/3/13b4dfb8e231fa91ee46ac19fa68e5e500707f4d.png)

Please, help me to find the **solution**!  
Thanks in advance.

Tim

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 April 2021 08:04 UTC](https://discourse.nodered.org/t/connection-node-red-to-postgresql-server/43619/2 "2021-04-04T08:04:11Z")

</div>

Welcome to the forum @tboekhorst

I see you have already [reposted](https://discourse.nodered.org/t/connection-node-red-to-postgresql-server/43620) this in the General category (you could just have changed the category on this one) so I will close this one in order to avoid confusion.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 April 2021 08:04 UTC](https://discourse.nodered.org/t/connection-node-red-to-postgresql-server/43619/3 "2021-04-04T08:04:21Z")

</div>


