pgsql: Use TypeName to represent type names in certain commands

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Use TypeName to represent type names in certain commands
Дата
Msg-id E1Y607N-0007x9-BN@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Use TypeName to represent type names in certain commands  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Revert the GinMaxItemSize calculation so that we fit 3 tuples pe
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: pgsql: Use TypeName to represent type names in certain commands