Re: Portal->commandTag as an enum
Mark Dilger <mark.dilger@enterprisedb.com>
From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
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-29T00:26:13Z
Lists: pgsql-hackers
> On Feb 28, 2020, at 3:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Alvaro Herrera <alvherre@2ndquadrant.com> writes: >> I just realized that we could rename command_tag_display_last_oid() to >> something like command_tag_print_a_useless_zero_for_historical_reasons() >> and nothing would be lost. > > 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. We already have problems with there being different commandtags for different versions of morally the same commands. Take for example "SELECT FOR KEY SHARE" vs. "SELECT FOR NO KEY UPDATE" vs. "SELECT FOR SHARE" vs. "SELECT FOR UPDATE". — Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Update comment
- b234b567ed74 13.0 landed
-
Represent command completion tags as structs
- 2f9661311b83 13.0 landed