Tatsuo Ishii <[EMAIL PROTECTED]> writes:
> CREATE FUNCTION myftest(INT)
> RETURNS INT
> AS '
> UPDATE t1 SET i = 1 WHERE i = 1;
> COPY t1 TO ''/tmp/t1.data'';
> SELECT i FROM t1 WHERE i = (SELECT i FROM t1 WHERE i = 1);
> '
> LANGUAGE 'sql';
> When COPY is invoked in the function, I thought SetQuerySnapshot is
> called.
Hmm, I think you are right. This means that calling SetQuerySnapshot
in ProcessUtility is the *wrong* place to do it; or that there should
be additional logic to suppress the call in this context. IMHO, anyway.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html