Обсуждение: pgsql/src backend/tcop/pquery.c backend/utils/ ...

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

pgsql/src backend/tcop/pquery.c backend/utils/ ...

От
Tom Lane
Дата:
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    tgl@hub.org    01/02/27 17:07:34

Modified files:
    src/backend/tcop: pquery.c
    src/backend/utils/mmgr: portalmem.c
    src/include/utils: portal.h
    src/backend/commands: command.c

Log message:
    Tweak portal (cursor) code so that it will not call the executor again
    when user does another FETCH after reaching end of data, or another
    FETCH backwards after reaching start.  This is needed because some plan
    nodes are not very robust about being called again after they've already
    returned NULL; for example, MergeJoin will crash in some states but not
    others.  While the ideal approach would be for them all to handle this
    correctly, it seems foolish to assume that no such bugs would creep in
    again once cleaned up.  Therefore, the most robust answer is to prevent
    the situation from arising at all.