Re: ProcessUtility_hook - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: ProcessUtility_hook
Date
Msg-id 20091210121409.54C8.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: ProcessUtility_hook  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: ProcessUtility_hook  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:

> > Like this?
> > /*
> >  * Parse command tag to retrieve the number of affected rows.
> >  * COPY command returns COPY tag. EXECUTE command might return INSERT,
> >  * UPDATE, or DELETE tags, but we cannot retrieve the number of rows
> >  * for SELECT. We assume other commands always return 0 row.
> >  */
> 
> 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.
----

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: bug: fuzzystrmatch levenshtein is wrong
Next
From: Robert Haas
Date:
Subject: Re: ProcessUtility_hook