Notices
 

HOW TO CLEAN (DELETE DATA FROM ALL TABLES) DATA IN A POSTGRESQL DATABASE

For page specific messages
For page author info

By using postgresql functions we can easily clean/delete the data of all tables of a particular schema in postgresl database.

Here is the postgresql function which deletes all table data of a database in a single function call.

 

 

 

 

 

 

N.B. Here “myschema” is the schema of a particular database.  If we don’t use any schema definition, in that case we can use the following code.

 

Exclude node summary : 

n
 
X