Re: BUG #3598: Strange behaviour of character columns in select with views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3598: Strange behaviour of character columns in select with views
Дата
Msg-id 29142.1189100514@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #3598: Strange behaviour of character columns in select with views  ("Luiz K. Matsumura" <luiz@planit.com.br>)
Список pgsql-bugs
"Luiz K. Matsumura" <luiz@planit.com.br> writes:
> Description:        Strange behaviour of character columns in select with
> views

I've applied a fix for this in CVS HEAD (8.3-to-be), but it seems
impractical to fix it in 8.2 (or 8.1 which also has the issue).
The problem is that when "null::char(3)" is simplified to a bare Const
expression node, the length knowledge is lost because there is no place
to store typmod in pre-8.3 Const nodes.  The peculiar-seeming dependence
on the form of the query is because the behavior depends on exactly
which version of the select list (before or after const simplification)
is looked at to generate the typmod value that ultimately gets sent to
the client.

While it might be possible to find a hack that improves the behavior for
specific cases in 8.2 (by changing around when we look at what), the
fundamental lack of the needed field in Const nodes is unfixable without
forcing initdb, which we won't do in released branches.  So I'm not
excited about looking for a band-aid answer for 8.2 or 8.1.

            regards, tom lane

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

Предыдущее
От: "Jayaram R"
Дата:
Сообщение: BUG #3603: ADO PostgreSQL OLE DB Provider ERROR
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: create index concurrently blocks on transactions in other databases