Delete bytea data from Postgresql

948 views Asked by At

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?

1

There are 1 answers

1
exanoid On

I actually need to vacuum after i set everything to null

update ir_attachment set db_datas = NULL;

VACUUM (VERBOSE, FULL) ir_attachment;