Re: Portal->commandTag as an enum
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
John Naylor <john.naylor@2ndquadrant.com>,
Andres Freund <andres@anarazel.de>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-02-29T01:42:02Z
Lists: pgsql-hackers
Mark Dilger <mark.dilger@enterprisedb.com> writes: >> On Feb 28, 2020, at 3:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Is there a way to drop that logic altogether by making the tagname string >> be "INSERT 0" for the INSERT case? Or would the zero bleed into other >> places where we don't want it? > In general, I don't think we want to increase the number of distinct > tags. Which command you finished running and whether you want a > rowcount and/or lastoid are orthogonal issues. Well, my thought is that last_oid is gone and it isn't ever coming back. So the less code we use supporting a dead feature, the better. If we can't remove the special case in EndCommand() altogether, I'd be inclined to hard-code it as "if (tag == CMDTAG_INSERT ..." rather than expend infrastructure on treating last_oid as a live option for commands to have. regards, tom lane
Commits
-
Update comment
- b234b567ed74 13.0 landed
-
Represent command completion tags as structs
- 2f9661311b83 13.0 landed