Skip to content

Postgres Node Returns Empty Result, but Query Works in pgAdmin #16537

Open
@avsion

Description

@avsion

Bug Description

"Hello, I have an n8n workflow with a Postgres node that always returns an empty result [ ].

I have confirmed the exact same SQL query works perfectly when run directly in pgAdmin with the same user, and it finds the data.
I have confirmed my n8n credential points to the exact same host, database, and user as my working pgAdmin connection.
I have already restarted the n8n and Postgres containers multiple times.
I have tried different query formats (ILIKE and lower()).
This seems to be an environmental issue with how the n8n node is connecting. Can anyone help me troubleshoot what might be happening at the connection/environment level?"

To Reproduce

I have confirmed the exact same SQL query works perfectly when run directly in pgAdmin with the same user, and it finds the data.
I have confirmed my n8n credential points to the exact same host, database, and user as my working pgAdmin connection.
I have already restarted the n8n and Postgres containers multiple times.
I have tried different query formats (ILIKE and lower()).
This seems to be an environmental issue with how the n8n node is connecting. Can anyone help me troubleshoot what might be happening at the connection/environment level?"

Expected behavior

output contact name from the database table or even in manual test

Operating System

Ubuntu 204

n8n Version

1.98.2

Node.js Version

v22.16.0

Database

PostgreSQL

Execution mode

main (default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs FeedbackWaiting for further input or clarification.in linearIssue or PR has been created in Linear for internal review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions