a question about exec_simple_query() - Mailing list pgsql-hackers

From 汪琦
Subject a question about exec_simple_query()
Date
Msg-id 484DEA19.04359E.25430@m5-81.163.com
Whole thread Raw
Responses Re: a question about exec_simple_query()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi, everyone:
    In functin exec_simple_query(), why we run a simple query wrapped in a portal.
    For instance:
    version 8.3.0 ,postgres.c, Line 908
    /*     * Create unnamed portal to run the query or queries in. If there     * already is one, silently drop it.
*/   portal = CreatePortal("", true, true);
 
    ......
        In other words, what's the benifit we use a portal to run a simple query?

    Thanks for your help!  :)





pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Core team statement on replication in PostgreSQL
Next
From: "Koichi Suzuki"
Date:
Subject: Re: Core team statement on replication in PostgreSQL