pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add select_common_typmod()
Date: Tue, 27 Oct 2020 17:11:09 +0000
Message-ID: <E1kXSV3-0002gK-R7@gemulon.postgresql.org> (raw)

Add select_common_typmod()

This accompanies select_common_type() and select_common_collation().
Typmods were previously combined using hand-coded logic in several
places.  The logic in select_common_typmod() isn't very exciting, but
it makes the code more compact and readable in a few locations, and in
the future we can perhaps do more complicated things if desired.

As a small enhancement, the type unification of the direct and
aggregate arguments of hypothetical-set aggregates now unifies the
typmod as well using this new function, instead of just dropping it.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://www.postgresql.org/message-id/flat/97df3af9-8b5e-fb7f-a029-3eb7e80d7af9@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f893e68d761adbee7f888109b1adf76151e3e17a

Modified Files
--------------
src/backend/parser/analyze.c      | 26 ++++++--------------------
src/backend/parser/parse_clause.c | 23 ++++++-----------------
src/backend/parser/parse_coerce.c | 37 +++++++++++++++++++++++++++++++++++++
src/backend/parser/parse_func.c   |  8 ++++++--
src/include/parser/parse_coerce.h |  2 ++
5 files changed, 57 insertions(+), 39 deletions(-)



Message-ID: <E1kXSV3-0002gK-R7@gemulon.postgresql.org>
Permalink:  ../E1kXSV3-0002gK-R7@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kXSV3-0002gK-R7@gemulon.postgresql.org

 · 

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: peter@eisentraut.org
  Subject: Re: pgsql: Add select_common_typmod()
  In-Reply-To: <E1kXSV3-0002gK-R7@gemulon.postgresql.org>
  References: <E1kXSV3-0002gK-R7@gemulon.postgresql.org>

* 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