Tom Lane wrote:
> Hiroshi Inoue <[EMAIL PROTECTED]> 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.
>
If there's no concept of top-level statement,there's no
concept of read consistency and MVCC isn't needed.
Regards.
Hiroshi Inoue.
- Re: [HACKERS] time stops within transaction Peter Eisentraut
- Re: [HACKERS] time stops within transaction Tom Lane
- Re: [HACKERS] time stops within transaction Peter Eisentraut
- Re: [HACKERS] time stops within transact... Tom Lane
- Re: [HACKERS] time stops within tra... Peter Eisentraut
- Re: [HACKERS] time stops within tra... Don Baccus
- Re: [HACKERS] time stops within tra... Alex Pilosov
- Re: [HACKERS] time stops within... Tom Lane
- Re: [HACKERS] time stops within... Hiroshi Inoue
- Re: [HACKERS] time stops within... Tom Lane
- Re: [HACKERS] time stops within... Hiroshi Inoue
- Re: [HACKERS] time stops within... Vadim Mikheev
- Re: [HACKERS] time stops within... Hiroshi Inoue
- Re: [HACKERS] time stops within... Tom Lane
- Re: [HACKERS] time stops within... Vadim Mikheev
- Re: [HACKERS] time stops within... Hiroshi Inoue
- RE: [HACKERS] time stops within... Hiroshi Inoue
- Re: [HACKERS] time stops within transaction Karel Zak
- Re: [HACKERS] time stops within transaction Mikheev, Vadim