Re: What does this error message mean?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What does this error message mean?
Дата
Msg-id 14635.1384747176@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: What does this error message mean?  (Ken Tanzer <ken.tanzer@gmail.com>)
Ответы Re: What does this error message mean?  (Ken Tanzer <ken.tanzer@gmail.com>)
Список pgsql-general
Ken Tanzer <ken.tanzer@gmail.com> writes:
> But thinking about it some more, the function runs one of 5 possible
> queries.  4 of them select NULL as comment (no cast), while the fifth (and
> the one that caused this error) selects 'a string'.

Ah.  Fixing that so all the variants produce the same (explicit) type
should take care of this.

> I assume this will go away if I change my lazy query and cast my NULLs, but
> still wonder if this is something that should be expected to fail?

Ideally it wouldn't, but it's not clear what it'd cost to fix it.
If we just silently replanned when the query output types changed,
then this type of situation would work but would carry a large hidden
performance penalty.  That's not too appetizing either.

            regards, tom lane


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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Sum 2 tables based on key from other table
Следующее
От: Tony Theodore
Дата:
Сообщение: Re: Composite types or composite keys?