pgsql: Fix select_common_type() so that it can select a domain type, if

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix select_common_type() so that it can select a domain type, if
Дата
Msg-id 20071126164651.1E8957540F0@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix select_common_type() so that it can select a domain type, if all inputs
to a UNION, CASE, or related construct are of the same domain type.  The
main part of this routine smashes domains to their base types, which seems
necessary because the logic involves TypeCategory() and IsPreferredType(),
neither of which work usefully on domains.  However, we can add a first
pass that just detects whether all the inputs are exactly the same type,
and if so accept that without question (so long as it's not UNKNOWN).
Per recent gripe from Dean Rasheed.

In passing, remove some tests for InvalidOid, which have clearly been dead
code for quite some time now, because getBaseType() would fail on that input.

Also, clarify the manual's not-very-precise description of the existing
algorithm's behavior.

Modified Files:
--------------
    pgsql/doc/src/sgml:
        typeconv.sgml (r1.52 -> r1.53)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/typeconv.sgml?r1=1.52&r2=1.53)
    pgsql/src/backend/parser:
        parse_coerce.c (r2.158 -> r2.159)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_coerce.c?r1=2.158&r2=2.159)
    pgsql/src/test/regress/expected:
        domain.out (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/domain.out?r1=1.42&r2=1.43)
    pgsql/src/test/regress/sql:
        domain.sql (r1.25 -> r1.26)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/domain.sql?r1=1.25&r2=1.26)

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

Предыдущее
От: petere@postgresql.org (Peter Eisentraut)
Дата:
Сообщение: pgsql: Require a specific Autoconf version, instead of a lower bound
Следующее
От: dim@pgfoundry.org (User Dim)
Дата:
Сообщение: pgloader - pgloader: Support for template sections, WIP