Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.
Дата
Msg-id CACjxUsP5SiteqKJq3um+RvLkRX+k02b+5BHgnc8VsgdSFj2V-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.  (Kevin Grittner <kgrittn@gmail.com>)
Ответы Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-committers
On Thu, Apr 6, 2017 at 6:10 PM, Kevin Grittner <kgrittn@gmail.com> wrote:

>  * About JOINs and dropped columns: although the parser never includes an
>  * already-dropped column in a JOIN RTE's alias var list, it is possible for
>  * such a list in a stored rule to include references to dropped columns.
>  * (If the column is not explicitly referenced anywhere else in the query,
>  * the dependency mechanism won't consider it used by the rule and so won't
>  * prevent the column drop.)  To support get_rte_attribute_is_dropped(), we
>  * replace join alias vars that reference dropped columns with null pointers.

test=# create table t1 (t1id int not null, t1desc text);
CREATE TABLE
test=# create table t2 (t1id int not null, t2id int not null, t2desc text);
CREATE TABLE
test=# create view v1 as select t2desc from t1 join t2 on t1.t1id = t2.t1id;
CREATE VIEW
test=# alter table t1 drop column t1id;
ERROR:  cannot drop table t1 column t1id because other objects depend on it
DETAIL:  view v1 depends on table t1 column t1id
HINT:  Use DROP ... CASCADE to drop the dependent objects too.

Is that comment wrong?

--
Kevin Grittner


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: [COMMITTERS] pgsql: Use SASLprep to normalize passwords for SCRAM authentication.
Следующее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Fix planner error (or assert trap) with nested set operations.