--- id: postgresql title: PostgreSQL --- ToolJet has the capability to connect to PostgreSQL databases for data retrieval and modification.
### Connection String
To connect to PostgreSQL using a connection string, select **Connection String** as the connection type and provide the following details:
- **Connection String**
### SQL Mode
To execute SQL queries, select the SQL mode from the dropdown and enter your query in the editor.
#### Parameterized Queries:
ToolJet offers support for parameterized SQL queries, which enhance security by preventing SQL injection and allow for dynamic query construction. To implement parameterized queries:
1. Use `:parameter_name` as placeholders in your SQL query where you want to insert parameters.
2. In the **Parameters** section below the query editor, add key-value pairs for each parameter.
3. The keys should match the parameter names used in the query (without the colon).
4. The values can be static values or dynamic values using the `{{ }}` notation.
##### Example:
```yaml
Query: SELECT * FROM users WHERE username = :username
SQL Parameters:
Key: username
Value: oliver // or {{ components.username.value }}
```
#### Query Timeout
You can set the timeout duration for SQL queries by adding the `PLUGINS_SQL_DB_STATEMENT_TIMEOUT` variable to the environment configuration file. By default, it is set to 120,000 ms.
### GUI Mode
Choose the GUI mode from the dropdown and select the operation **Bulk update using primary key**. Provide the **Table** name and the **Primary key column** name. Then, in the editor, input the **records** as an array of objects.
```json
[
{
"customer_id": 1,
"country": "India"
},
{
"customer_id": 2,
"country": "USA"
}
]
```
:::tip
- You can apply transformations to the query results. Refer to our transformations documentation for more details: **[Transformation Tutorial](/docs/tutorial/transformations)**
- Check out this how-to guide on **[bulk updating multiple rows](/docs/how-to/bulk-update-multiple-rows)** from a table component.
:::