Managing tables

Modify or delete Baseten Postgres tables.

From the Data page, you can manage your Baseten Postgres tables.

Click on a table to modify it. The table modification screen is the same as table creation. You can update the table's name and description.

Re-naming a table will update its name in the database as well. If any queries refer to the table's old name, these queries will break.

Deleting data

If your table is full of extraneous test data, you may want to clean it out prior to deploying your application.

To remove all rows from a table without deleting the table itself, use the "Delete all rows" button in the bottom-right of the table modification screen.

Confirm the deletion by typing the table name into the field. All data will be wiped from the table and you'll be left with an empty table.

If you only want to remove some rows from a table, write SQL in the ad-hoc query interface.

DELETE FROM my_table WHERE condition = False RETURNING *;

Deleting tables

Deleting a table is a major and irreversible change. Please carefully consider the effects of the deletion on existing applications, queries, and worklets before continuing. If the table is unused and the data within is stored elsewhere or not needed, proceed to deletion.

On the main tab of the Data page, find the table you want to delete and click the trashcan icon.

Confirm the deletion by typing the table name into the field. The data table will be deleted promptly.

Last updated