bogus tsdict, tsparser, etc object identities

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема bogus tsdict, tsparser, etc object identities
Дата
Msg-id 20140409220328.GZ5822@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответы Re: bogus tsdict, tsparser, etc object identities  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
I noticed that pg_identify_object() gives a bogus answer for the text
search object types: it is failing to schema-qualify the objects.  I
guess at the time I thought that those object types were global, not
contained within schemas (as seems reasonable.  Who would want to have
different text search parsers in different schemas anyway?)

alvherre=# CREATE TEXT SEARCH DICTIONARY alt_ts_dict1 (template=simple);
CREATE TEXT SEARCH DICTIONARY
alvherre=# create schema foo;
CREATE SCHEMA
alvherre=# CREATE TEXT SEARCH DICTIONARY foo.alt_ts_dict1 (template=simple);
CREATE TEXT SEARCH DICTIONARY

Before patch,

alvherre=# select identity.* from pg_ts_dict, pg_identify_object('pg_ts_dict'::regclass, oid, 0) identity where schema
<>'pg_catalog'; 
          type          | schema |     name     |   identity
------------------------+--------+--------------+--------------
 text search dictionary | public | alt_ts_dict1 | alt_ts_dict1
 text search dictionary | foo    | alt_ts_dict1 | alt_ts_dict1
(2 filas)

After patch,

alvherre=# select identity.* from pg_ts_dict, pg_identify_object('pg_ts_dict'::regclass, oid, 0) identity where schema
<>'pg_catalog'; 
          type          | schema |     name     |      identity
------------------------+--------+--------------+---------------------
 text search dictionary | public | alt_ts_dict1 | public.alt_ts_dict1
 text search dictionary | foo    | alt_ts_dict1 | foo.alt_ts_dict1
(2 filas)

This problem is new in 9.3, so backpatching to that.  Prior to that we
didn't have object identities.

The attached patch demonstrates the fix for tsdict only, but as I said
above all text search object types are affected, so I'm going to
backpatch for all of them.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Per table autovacuum vacuum cost limit behaviour strange