Re: PL/pgSQL bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: Inoue(at)tpf(dot)co(dot)jp, JanWieck(at)Yahoo(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/pgSQL bug?
Date: 2001-08-13 03:04:40
Message-ID: 2351.997671880@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-08-13 03:09:26 Re: Portal destination issue: binary vs normal cursors
Previous Message Tatsuo Ishii 2001-08-13 02:46:25 Re: PL/pgSQL bug?