Dropped index on table preventing rule creation

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Dropped index on table preventing rule creation
Дата
Msg-id CAA-aLv7sszmU+Fz-xLo6cOiASUiX0mCRwAMF2FB=2j-5MKqb+A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Dropped index on table preventing rule creation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi,

I don't use rules, but in a bit of experimentation on Git master, I
discovered the following behaviour:

CREATE TABLE test1 (id serial primary key, things text);
CREATE TABLE test2 (id serial primary key, things text);
ALTER TABLE test1 DROP CONSTRAINT test1_pkey;
ALTER TABLE test2 DROP CONSTRAINT test2_pkey;
CREATE RULE "_RETURN" AS ON SELECT TO test1 DO INSTEAD select * from test2;

This produces the error message: could not convert table "test1" to a
view because it has indexes

There are no indexes or primary keys on either table by the time the
rule creation statement runs.  If creating the same 2 tables without
originally giving them primary keys, this rule creates successfully.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: BUG #6201: Windows User Log Off Causes Backend Exception 0xC0000142
Следующее
От: "Roman"
Дата:
Сообщение: BUG #6202: type of union column selection bug