Connecting to PostgreSQL: Common Questions

Svitlana Zh.
Svitlana Zh.
  • Updated
Do I have to whitelist LeadsBridge IPs?

Yes. To connect your PostgreSQL database, you must whitelist LeadsBridge IPs. For more information, please refer to the LeadsBridge IP addresses article.

How do I add my table database schema?

If you receive the error message “Undefined table: 7 ERROR: relation “table name” does not exist”, it means LeadsBridge cannot find your table in the default database schema. To add the database schema:

  1. Go to the Integrations section of your LeadsBridge account.
  2. Open your PostgreSQL integration settings.
  3. Enter your table database schema in the Database Schema (Optional) field.
  4. Click Finish to save the changes.
How should the query be formulated?
  • Table/View Selection (Custom Query Disabled): When the “use custom query” flag is disabled, select the table or view from which you want to retrieve data.
  • Custom Query (Custom Query Enabled): When the “use custom query” flag is enabled, you can write a custom query to retrieve data. The query must be written in SQL and be compatible with PostgreSQL.

The bridge synchronization runs every 30 minutes after the last execution is completed. For example, if a sync starts at 9:00 AM and finishes at 9:15 AM, the next sync is scheduled for 9:45 AM. The query is executed during each synchronization.

Important Note: On the first sync after the bridge is published, only new data will be synchronized from that point forward. Existing data in the database will not be synced during the initial sync.

What is used as an identifier for the record?

The identifier used for each record depends on the following:

  • Mapped Email Field: If the record contains a mapped field with an email value, that email value is used as the identifier.
  • Mapped “id” Field: If the record contains a mapped field named “id,” the value of that “id” field is used as the identifier.
  • Hash of Mapped Fields (Other Cases): If neither a mapped email field nor a mapped “id” field exists, the identifier is calculated using a hash function on all mapped fields. This means that if any value in the mapped fields changes, the hash value will also change, and LeadsBridge will treat it as a new record, potentially leading to re-synchronization.

Why am I getting the error “SQLSTATE[08006] [7] could not connect to the server”?

This error typically indicates you are attempting to create a test connection using your local database. LeadsBridge cannot connect to your local PostgreSQL host because our application does not have access to your local server. For data synchronization with LeadsBridge, your database must be live and accessible from the Internet.


Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.