Joseph Shraibman <[EMAIL PROTECTED]> writes:
> Do you really think I should do 1000 updates in a transaction instead of
> an IN with 1000 items? I can do my buffer flush any way I want but I'd
> have to think the overhead of making 1000 calls to the backend would be
> more than overwhelm the cost
Joseph Shraibman <[EMAIL PROTECTED]> writes:
> I recently tried to do a big update with postgres 7.1.2. The update was
> something like
> UPDATE table SET status = 2 WHERE id IN (a few thousand entries) AND
> status = 1;
> and I got:
> ERROR: Expression too complex: nesting depth exceeds max_ex
I don't know the cause, but if you only have to run this procedure once in
a while, you could select all the records that need to be updated, and use
a text editor to build a few thousand single update statement, then save
this file and echo it to the postgres backend through psql.
Good Luck!