From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | Alex Pilosov <alex(at)pilosoft(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: time stops within transaction |
Date: | 2000-10-19 04:22:58 |
Message-ID: | 7673.971929378@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
>>>> Postgres doesn't have an idea of what a 'top-level' statement is? I.E.
>>>> statement as submitted by a client (libpq)?
>>
>> There's never been any reason to make such a distinction.
> There's already a distinction.
> Snapshot is made per top-level statement and functions/subqueries
> use the same snapshot as that of top-level statement.
Not so. SetQuerySnapshot is executed per querytree, not per top-level
statement --- for example, if a rule generates multiple queries from
a user statement, SetQuerySnapshot is called again for each query.
With the current structure of pg_exec_query_string(), an operation
executed in the outer loop, rather than the inner, would more or less
correspond to one "top level" query --- if you want to assume that
pg_exec_query_string() is only called from PostgresMain. That's
true today but hasn't always been true --- I believe it used to be
used to parse SPI commands, and someday it may be again.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2000-10-19 04:39:00 | Re: Re: pg_dump docs |
Previous Message | Tom Lane | 2000-10-19 04:02:56 | Re: Postgre7.0.2 drop user bug |