Actions6
- Database Actions
Database → Delete
AI-generatedSummary
The Postgres (AWS IAM) node's Delete operation for the Database resource allows users to delete data or an entire table in a PostgreSQL database. It supports three commands: Truncate (removes data but preserves structure), Delete (removes rows matching conditions, or all rows if none specified), and Drop (removes both data and structure). The operation supports AWS region selection, connection details (endpoint, port, user), and database/schema selection. Additional options include restarting sequences after truncation, combining row selection conditions, and various output and query processing options.
Inputs
- awsRegion (required) — The AWS region where the RDS instance is located
- endpoint (required) — The RDS instance endpoint hostname
- port (required) — The port number of the RDS instance
- user (required) — The database user configured for IAM authentication
- database (required) — The name of the database to connect to
- schema (required) — The schema that contains the table you want to work on
- deleteCommand (required) — The command to execute: Truncate, Delete, or Drop
- restartSequences (required) — Whether to reset identity (auto-increment) columns to their initial values
- where (required) — If not set, all rows will be selected for deletion
- combineConditions (required) — How to combine the conditions defined in 'Select Rows': AND requires all conditions to be true, OR requires at least one condition to be true
- cascade — Whether to drop all objects that depend on the table, such as views and sequences
- connectionTimeout — Number of seconds reserved for connecting to the database
- delayClosingIdleConnection — Number of seconds to wait before idle connection would be eligible for closing
- queryBatching — The way queries should be sent to the database: Single Query, Independent, or Transaction
Output shape
The operation returns success confirmation or query results depending on the delete command and query batching settings.
For 'Delete' command with no selection conditions, all rows in the table are deleted. For 'Drop', both data and table structure are removed. 'Truncate' removes data but preserves the table structure.
Examples
Example 1: Delete specific rows
Set deleteCommand to 'delete', configure 'Select Rows' conditions, and optionally set 'Combine Conditions' to AND or OR.
Example 2: Truncate table
Set deleteCommand to 'truncate' and optionally enable 'Restart Sequences' to reset auto-increment columns.
Example 3: Drop table
Set deleteCommand to 'drop' and optionally enable 'Cascade' to remove dependent objects.