Registry / database / n8n-nodes-postgres-enc

n8n-nodes-postgres-enc

JSON →
library0.1.16jsnpmunverified

An n8n community node package that extends the built-in Postgres integration with support for SSL/TLS connection modes, specifically ssmode=verify-ca and verify-full, similar to the SSL support added to MySQL. Version 0.1.16 is the latest stable release; updates are infrequent. It provides a custom Postgres credential type and node for n8n workflows, enabling encrypted connections to PostgreSQL databases. This package is necessary for users who require TLS verification for secure database access within n8n, as the default Postgres node lacks this feature. It is distributed on npm and designed to be installed as an n8n community node package.

npm install n8n-nodes-postgres-enc
INSTALL
IMPORT
SIG · N8N-NODES-POSTGRES
N
n8n-nodes-postgres-enc
databasejavascriptv0.1.16
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PostgresEnc
import { PostgresEnc } from 'n8n-nodes-postgres-enc'
const PostgresEnc = require('n8n-nodes-postgres-enc')
ESM-only; no CommonJS support. Use dynamic import for n8n nodes.
PostgresEncApi
import { PostgresEncApi } from 'n8n-nodes-postgres-enc'
const { PostgresEncApi } = require('n8n-nodes-postgres-enc')
Named export for the credential API class.
IPostgresEncCredentials
import type { IPostgresEncCredentials } from 'n8n-nodes-postgres-enc'
import { IPostgresEncCredentials } from 'n8n-nodes-postgres-enc'
Type-only export; must use import type to avoid runtime errors in n8n.

Shows importing and instantiating the Postgres node and credential classes in a TypeScript n8n environment.

import { PostgresEnc } from 'n8n-nodes-postgres-enc'; import { PostgresEncApi } from 'n8n-nodes-postgres-enc'; import type { IPostgresEncCredentials } from 'n8n-nodes-postgres-enc'; const node = new PostgresEnc(); console.log('Node name:', node.description.name); // Credentials example const creds = new PostgresEncApi(); console.log('Credential name:', creds.name); // Credential fields include: host, port, database, user, password, ssl, caCertificate
Debug
Known issues
breakingSSL verification modes (verify-ca, verify-full) require a valid CA certificate; connection fails if not provided.
fix
Ensure the 'caCertificate' field contains the correct CA certificate string (PEM format) when using sslmode=verify-ca or verify-full.
affects: >=0.1.0
deprecatedThe sslmode 'disable' is not recommended and may be removed in future versions.
fix
Use sslmode 'require' or higher; avoid 'disable' for production.
affects: >=0.1.0
gotchaCredential testing does not work for non-API-based credentials in n8n; users may see 'Couldn’t connect with these settings' errors even if credentials are valid.
fix
Ignore credential testing errors; proceed to use the node in a workflow to verify connectivity.
affects: >=0.1.0
Errors
Common errors & fixes
Error: self-signed certificate in certificate chain
The CA certificate is missing, invalid, or the server certificate is self-signed and not trusted.
fix
Provide the correct CA certificate in the 'caCertificate' field, or use sslmode=require instead of verify-full.
Could not find credential type 'PostgresEncApi'
The n8n instance has not loaded the community node package or the credential type is not registered.
fix
Ensure the package is installed correctly in the custom nodes directory and restart n8n.
Upgrade
Version history
0.1.16latest on npm
Audit
Dependencies
n8n-workflowrequiredRequired to define n8n node and credential types
Agent activity
4 hits · last 30 days
node
4
Resources
n8n-nodes-postgres-enc — npm install n8n-nodes-postgres-enc · libregistry