From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix format_type() to restore its old behavior.
Date: Thu, 01 Mar 2018 16:37:51 +0000
Message-ID: <E1erRDL-0008Gn-Gw@gemulon.postgresql.org> (raw)
Fix format_type() to restore its old behavior.
Commit a26116c6c accidentally changed the behavior of the SQL format_type()
function while refactoring. For the reasons explained in that function's
comment, a NULL typemod argument should behave differently from a -1
argument. Since we've managed to break this, add a regression test
memorializing the intended behavior.
In passing, be consistent about the type of the "flags" parameter.
Noted by Rushabh Lathia, though I revised the patch some more.
Discussion: https://postgr.es/m/CAGPqQf3RB2q-d2Awp_-x-Ur6aOxTUwnApt-vm-iTtceZxYnePg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8f72a5704854d292065886eb47ba18fbd504113e
Modified Files
--------------
contrib/postgres_fdw/deparse.c | 2 +-
src/backend/utils/adt/format_type.c | 30 +++++++++++++++++++-----------
src/test/regress/expected/create_type.out | 20 ++++++++++++++++++++
src/test/regress/sql/create_type.sql | 6 ++++++
4 files changed, 46 insertions(+), 12 deletions(-)
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix format_type() to restore its old behavior.
In-Reply-To: <E1erRDL-0008Gn-Gw@gemulon.postgresql.org>
References: <E1erRDL-0008Gn-Gw@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