Re: ProcessUtility_hook

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ProcessUtility_hook
Date: 2009-12-10 03:14:09
Message-ID: 20091210121409.54C8.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-12-10 03:20:21 Re: ProcessUtility_hook
Previous Message Robert Haas 2009-12-10 03:05:09 Re: bug: fuzzystrmatch levenshtein is wrong