Search Postgresql Archives

Re: [webmaster] How to commit/vacuum a batch of delete statements in a postgresql function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi PostGresSQL Team

Could you advise us on how to commit records in a batch when one is doing batch wise deletion
. I came across http://www.postgresql.org/message-id/60644bymua.fsf@xxxxxxxxxxxxxxxxxxxxxxx, but use of vacuum is giving an error as follows from function.
********** Error **********

ERROR: VACUUM cannot be executed from a function or multi-command string
SQL state: 25001

My stored procedure is of the format:

Loop 
exit when <some condition> DELETE from incoming_table where xyz='123'; VACUUM incoming_table; -- or commit; End Loop;



I thank you for the help.
-Nava

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux