[Pgpool-general] DECLARE cursorname not being redirected correctly

Henry henry at zen.co.za
Thu Aug 28 18:18:47 UTC 2008


On Thu, August 28, 2008 6:22 pm, Henry wrote:
> SELECT 1; DECLARE cursorname CURSOR WITH HOLD FOR SELECT * FROM tablename;

It looks like the following might be a work-around (I seem to recall this
trick being mentioned somewhere by Tatsuo Ishii):

/* SELECT */ DECLARE cursorname CURSOR WITH...
/* SELECT */ FETCH 1000 FROM ...
/* SELECT */ CLOSE cursorname;

The NOP selects fool the parser to force it to the local node.

I'll confirm once I've had some sleep.

Cheers
Henry



More information about the Pgpool-general mailing list