Re: Portal->commandTag as an enum

Mark Dilger <mark.dilger@enterprisedb.com>

From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, John Naylor <john.naylor@2ndquadrant.com>, Andres Freund <andres@anarazel.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-03-02T22:30:58Z
Lists: pgsql-hackers

> On Mar 2, 2020, at 1:57 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> 
> On 2020-Mar-02, Mark Dilger wrote:
> 
>> I think it is more natural to change event trigger code to reason
>> natively about CommandTags rather than continuing to reason about
>> strings.  The conversion back-and-forth between the enum and the
>> string representation serves no useful purpose that I can see.  But I
>> understand if you are just trying to have the patch change fewer parts
>> of the code, and if you feel more comfortable about reverting that
>> part of the patch, as the committer, I think that's your prerogative.
> 
> Nah -- after reading it again, that would make no sense.  With the
> change, we're forcing all writers of event trigger functions in C to
> adapt their functions to the new API, but that's okay -- I don't expect
> there will be many, and we're doing other things to the API anyway.
> 
> I pushed it now.

Thanks!  I greatly appreciate your time.

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






Commits

  1. Update comment

  2. Represent command completion tags as structs