pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Use TypeName to represent type names in certain commands
Date: Tue, 30 Dec 2014 16:58:01 +0000
Message-ID: <E1Y607N-0007x9-BN@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Use TypeName to represent type names in certain commands

In COMMENT, DROP, SECURITY LABEL, and the new pg_get_object_address
function, we were representing types as a list of names, same as other
objects; but types are special objects that require their own
representation to be totally accurate.  In the original COMMENT code we
had a note about fixing it which was lost in the course of c10575ff005.
Change all those places to use TypeName instead, as suggested by that
comment.

Right now the original coding doesn't cause any bugs, so no backpatch.
It is more problematic for proposed future code that operate with object
addresses from the SQL interface; type details such as array-ness are
lost when working with the degraded representation.

Thanks to Petr JelĂ­nek and Dimitri Fontaine for offlist help on finding
a solution to a shift/reduce grammar conflict.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3f88672a4e4d8e648d24ccc65937da61c7660854

Modified Files
--------------
src/backend/catalog/objectaddress.c     |   43 +++----------
src/backend/commands/dropcmds.c         |   10 +++-
src/backend/parser/gram.y               |  100 ++++++++++++++++++++++++++++---
src/test/regress/sql/object_address.sql |    2 +-
4 files changed, 107 insertions(+), 48 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (4+ messages)  latest in thread

Message-ID: <E1Y607N-0007x9-BN@gemulon.postgresql.org>
Permalink:  ../E1Y607N-0007x9-BN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Y607N-0007x9-BN@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: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Use TypeName to represent type names in certain commands
  In-Reply-To: <E1Y607N-0007x9-BN@gemulon.postgresql.org>
  References: <E1Y607N-0007x9-BN@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