Re: ProcessUtility_hook - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ProcessUtility_hook
Date
Msg-id 603c8f070912091920i67dd3daas87989ea24b510d8f@mail.gmail.com
Whole thread Raw
In response to Re: ProcessUtility_hook  (Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
On Wed, Dec 9, 2009 at 10:14 PM, Takahiro Itagaki
<itagaki.takahiro@oss.ntt.co.jp> wrote:
>> I'm confused by the "we cannot retrieve the number of rows for SELECT"
>> part.  Can you clarify that?
>
> Ah, I meant the SELECT was "EXECUTE of SELECT".
>
> If I use internal structure names, the explanation will be:
> ----
> EXECUTE command returns INSERT, UPDATE, DELETE, or SELECT tags.
> We can retrieve the number of rows from INSERT, UPDATE, and DELETE tags,
> but cannot from SELECT tag because the tag doesn't contain row numbers
> and also EState->es_processed is unavailable for EXECUTE commands.
> ----

OK, that makes sense.  It might read a little better this way:

The EXECUTE command returns INSERT, UPDATE, DELETE, or SELECT tags.
We can retrieve the number of rows from INSERT, UPDATE, and DELETE tags,
but the SELECT doesn't contain row numbers.  We also can't get it from
EState->es_processed, because that is unavailable for EXECUTE commands.

That seems like a rather unfortunate limitation though...

...Robert


pgsql-hackers by date:

Previous
From: Takahiro Itagaki
Date:
Subject: Re: ProcessUtility_hook
Next
From: Bruce Momjian
Date:
Subject: Re: Adding support for SE-Linux security