0

I'm using Openerp 7.0 and there are so many file that has been uploaded to that database I want to delete every file that has been uploaded. The Openerp is storing the data in a table called ir_attachment and a column db_datas that has type bytea.

So how do i delete every value from db_datas?

exanoid
  • 31
  • 4
  • Does this answer your question? [PostgreSQL delete all content](https://stackoverflow.com/questions/13223820/postgresql-delete-all-content) – Scoots Dec 24 '19 at 11:15
  • Why don't you simply set the column to `null`? –  Dec 24 '19 at 11:58

1 Answers1

1

I actually need to vacuum after i set everything to null

update ir_attachment set db_datas = NULL;

VACUUM (VERBOSE, FULL) ir_attachment;

exanoid
  • 31
  • 4