Troubleshooting
Check the questions below for common hiccups when using the hasura/postgres
native data connector.
Reach out to us for help, we're here for you!
I received the error message error communicating with database
This error message indicates that there was a problem connecting to the database. Some common issues are a typo in the connection string, a firewall blocking access, etc.
If you receive such an error, make sure that the PostgreSQL database is live, and that you can connect to it from your
machine using psql
using the same connection string supplied to your ndc-postgres
connector.
I received the error message invalid port number
If there isn't a problem with the port number itself, this might indicate a problem with the connection string URI in
general. One issue in particular might rise from a password containing certain characters, such as '#'. In order to
passwords containing these characters, they need to be escaped. This can be done using the encodeURIComponent
function
in Node.js:
$ node
Welcome to Node.js v20.10.0.
Type ".help" for more information.
> encodeURIComponent('^password#');
'%5Epassword%23'
I've changed my database schema and would like these changes propagated in Hasura
Running the ddn connector introspect command tells the CLI to update the
ndc-postgres
configuration. Note that the metadata.tables
part of the configuration will be refreshed and
overwritten when a change occurs.
I'd like to tweak how the connector works or does database introspection
The connector settings can be modified by editing the connector configuration. For example, you can tweak the Pool Settings, change the Isolation Level of transactions, or choose which schema not to introspect.
See the Configuration Reference for more information.
I'm having issues getting my Native Query to run
There are certain requirements that the SQL of a Native Query must fulfill, such omitting the semicolon in the SQL, or using arguments only in place of scalar values.
More information can be found in the Native Queries SQL Requirements section.