Truncate table tablename;
How to recover it back in dbeaver
Truncate table tablename;
How to recover it back in dbeaver
You cannot. See doc: http://www.postgresql.org/docs/9.1/static/sql-truncate.html
It has the same effect as an unqualified DELETE on each table, but since it does not actually scan the tables it is faster. Furthermore, it reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. This is most useful on large tables.
The space is returned to OS, it could be occupied by new data etc.
Tuncate uses file-level operations to delete the data, and this has a number of implications:
This means you basically have to recover from backup and this is a great case to use to warn that backups are about more than hardware failure. They are also there in case of administrator error (and that is why replication is not a backup).