Built-in apps
PostgreSQL
7min
with the postgresql app in {{product name}} , you can run your custom logic directly on your database server through functions {{product name}} loads the interface of input and output parameters dynamically so each parameter can be mapped individually requirements to use the postgresql app in {{product name}} , you must make sure sure the account you're using to connect to your database has read access to information schema routines and information schema parameters tables {{product name}} will make connections to your database from specifc ip addresses our servers are set up with valid ptr records so you can restrict access by allowing % make com connect postgresql and {{product name}} to create the connection log in to your {{product name}} account, add a postgresql module to your {{scenario singular lowercase}} , and click create a connection optional in the connection name field, enter a name for the connection enter information for the following fields field description host enter the postgresql database host port enter the port this must be a number between 1 and 65535 database enter the postgresql database user name enter your user name password enter your password client encoding enter the charset for the connection encrypt select yes or no keep alive select yes , no , or empty this enables tcp keep alive to maintain idele connections keep alive delay enter the initial delay in milliseconds for the first tcp keep alive message click save if prompted, authenticate your account and confirm access you've successfully created the connection and can now use the postgresql app in your {{scenario plural lowercase}} if you want to make changes to your connection in the future, follow the steps connect an application docid\ so88fm6pkt0g adkddfzz postgresql modules you can use the following modules to build your {{scenario plural lowercase}} actions delete row(s) from a table execute a function execute a query (advanced) insert row into a table update row(s) in a table searches select row(s) from a table troubleshooting the postgresql app the er lock wait timeout lock wait timeout exceeded; try restarting transaction error occurs when you modify the same data using multiple modules it is caused by sql transactions when any sql module is executed, it starts the transaction and the transaction is finished after the {{scenario singular lowercase}} is fully executed if another module tries to access the same data used in another unfinished transaction, then it has to wait until the previous transaction is finished – but it never happens because the first transaction will be finished after the {{scenario singular lowercase}} is finished to solve this, turn on auto commit it finishes (commits) every transaction immediately after the module execution is done open the {{scenario singular lowercase}} settings enable the auto commit checkbox click ok to confirm the settings postgresql resources postgresql org create function here is a sample sql statement that creates a function that inserts the values passed in the three parameters into a table create or replace function insert record from make( name character varying, email character varying, phone character varying) returns void language 'plpgsql' as $body$ begin insert into contacts (name, email, phone) values ( name, email, phone); end; $body$;