pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Re-allow DISTINCT in pl/pgsql expressions.
Date: Fri, 22 Jan 2021 19:09:54 -0500
Message-ID: <20210123000954.GB25546@momjian.us> (raw)
In-Reply-To: <20210123000420.GA25546@momjian.us>
References: <E1l33wr-0005sJ-9n@gemulon.postgresql.org>
	<20210123000420.GA25546@momjian.us>

On Fri, Jan 22, 2021 at 07:04:20PM -0500, Bruce Momjian wrote:
> On Fri, Jan 22, 2021 at 09:26:29PM +0000, Tom Lane wrote:
> > Re-allow DISTINCT in pl/pgsql expressions.
> > 
> > I'd omitted this from the grammar in commit c9d529848, figuring that
> > it wasn't worth supporting.  However we already have one complaint,
> > so it seems that judgment was wrong.  It doesn't require a huge
> > amount of code, so add it back.  (I'm still drawing the line at
> > UNION/INTERSECT/EXCEPT though: those'd require an unreasonable
> > amount of grammar refactoring, and the single-result-row restriction
> > makes them near useless anyway.)
> > 
> > Also rethink the documentation: this behavior is a property of
> > all pl/pgsql expressions, not just assignments.
> > 
> > Discussion: https://postgr.es/m/20210122134106.e94c5cd7@mail.verfriemelt.org
> 
> I am seeing a warning generated by preproc.y, which is generated via
> Perl from gram.y, which was modified by this commit.  The bison output
> is:
> 
> 	$ /usr/bin/bison -Wno-deprecated  -d -o preproc.c preproc.y
> 	preproc.y: warning: 1 nonterminal useless in grammar [-Wother]
> 	preproc.y: warning: 2 rules useless in grammar [-Wother]
> 	preproc.y:10134.2-20: warning: nonterminal useless in grammar: opt_distinct_clause [-Wother]
> 	  opt_distinct_clause:
> 	  ^~~~~~~~~~~~~~~~~~~
> 
> I only see it when I do a "make maintainer-clean" before the make
> because "make clean" does not remove preproc.y.

Sorry, this is Bison version 3.3.2, included in Debian 10.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






view thread (7+ messages)  latest in thread

Message-ID: <20210123000954.GB25546@momjian.us>
Permalink:  ../20210123000954.GB25546@momjian.us/
Also on:    postgresql.org/message-id/20210123000954.GB25546@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: bruce@momjian.us, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Re-allow DISTINCT in pl/pgsql expressions.
  In-Reply-To: <20210123000954.GB25546@momjian.us>
  References: <E1l33wr-0005sJ-9n@gemulon.postgresql.org> <20210123000420.GA25546@momjian.us> <20210123000954.GB25546@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox