PostgreSQL¶
Getting started with PostgreSQL¶
The PostgreSQL modules let you execute your custom logic directly in your database server through functions. Ibexa Connect loads interface of input and output parameters dynamically so each parameter can be mapped individually.
Functions¶
Here is a sample SQL statement that creates a function that just simply inserts the values passed in the three parameters into a table:
1 2 3 4 5 6 7 8 |
|
To learn more about creating functions, see PostgreSQL documentation.
Configuring your PostgreSQL server¶
Make sure the account you're using to connect to your database has read access to 'information_schema.routines' and 'information_schema.parameters' tables.
Ibexa Connect will make connections to your database from specific IP addresses. Our servers are set up with valid PTR records so you can easily restrict access by allowing %.make.com
.
Troubleshooting¶
ER_LOCK_WAIT_TIMEOUT: Lock wait timeout exceeded; try restarting transaction¶
This error occurs when you modify the same data using multiple modules. It is caused by SQL transactions.
When any SQL module is executed then it starts the transaction (1) and the transaction is finished after the scenario is fully executed.If another module tries to access the same data used in another unfinished transaction (1) then it has to wait until the previous transaction (1) is finished – but it never happens because the first transaction (1) will be finished after the scenario is finished.
Solution
Turn on Auto-commit. It finishes (commits) every transaction immediately after the module execution is done.
-
Open Scenario settings.
-
Enable the Auto commit checkbox.
-
Confirm the settings dialog by clicking the OK button.