Re: Portal->commandTag as an enum

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John Naylor <john(dot)naylor(at)2ndquadrant(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Portal->commandTag as an enum
Date: 2020-02-28 23:24:17
Message-ID: 20200228232417.GA30765@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Feb-28, Tom Lane wrote:

> Alvaro Herrera <alvherre(at)2ndquadrant(dot)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?

Hmm, interesting thought. But yeah, it would show up in ps display:

commandTag = CreateCommandTag(parsetree->stmt);

set_ps_display(GetCommandTagName(commandTag), false);

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-02-28 23:26:04 Re: ALTER tbl rewrite loses CLUSTER ON index (consider moving indisclustered to pg_class)
Previous Message Michael Paquier 2020-02-28 23:21:38 Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema