Обсуждение: pgsql-server/src/backend optimizer/plan/Tag: o ...

Поиск
Список
Период
Сортировка

pgsql-server/src/backend optimizer/plan/Tag: o ...

От
tgl@svr1.postgresql.org (Tom Lane)
Дата:
CVSROOT:    /cvsroot
Module name:    pgsql-server
Changes by:    tgl@svr1.postgresql.org    03/11/05 18:00:52

Modified files:
    src/backend/optimizer/plan: Tag: REL7_4_STABLE initsplan.c
    src/backend/parser: Tag: REL7_4_STABLE analyze.c

Log message:
    Fix for this problem:

    regression=# select 1 from tenk1 ta cross join tenk1 tb for update;
    ERROR:  no relation entry for relid 3

    7.3 said "SELECT FOR UPDATE cannot be applied to a join", which was better
    but still wrong, considering that 7.2 took the query just fine.  Fix by
    making transformForUpdate() ignore JOIN and other special RTE types,
    rather than trying to mark them FOR UPDATE.  The actual error message now
    only appears if you explicitly name the join in FOR UPDATE.