Re: Question regarding Sync message and unnamed portal

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Question regarding Sync message and unnamed portal
Date: 2013-01-25 18:28:48
Message-ID: 20130125182848.GE6848@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 1, 2012 at 02:04:00PM +0900, Tatsuo Ishii wrote:
> > Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
> >> From the manual:
> >> "An unnamed portal is destroyed at the end of the transaction"
> >
> > Actually, all portals are destroyed at end of transaction (unless
> > they're from holdable cursors). Named or not doesn't enter into it.
>
> We need to fix the document then.

I looked into this. The text reads:

If successfully created, a named prepared-statement object lasts till
the end of the current session, unless explicitly destroyed. An unnamed
prepared statement lasts only until the next Parse statement specifying
the unnamed statement as destination is issued.

While the first statement does say "named", the next sentence says
"unnamed", so I am not sure we can make this any clearer.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-01-25 18:33:12 Re: LATERAL, UNNEST and spec compliance
Previous Message Tom Lane 2013-01-25 18:17:20 Re: autovacuum not prioritising for-wraparound tables