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 25814.1188920840@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #3598: Strange behaviour of character columns in select with views  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Список pgsql-bugs
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> I can't reproduce this. View1.type1 has has type char(3) as expected in
> both cases, as witnessed by "CREATE VIEW f AS SELECT */type1 FROM
> view1"; \d f". How did you determine the data types?

I just did reproduce it: libpq's PQfmod() does report either the correct
typmod or -1, just as he says.  You can see the difference on the
backend side by looking at the top-level targetentries in EXPLAIN
VERBOSE, so it is a backend problem and not client-side.  My theory at
the moment is that there's something whacko about the planner's "use
physical tlist" optimization that's applied when it doesn't need to do
any projection (ie no computations or column rearrangements).  That code
works fine in simpler cases but there's something about this view that
confuses it.  Haven't dug into it in detail yet.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #3597: CREATE OR REPLACE VIEW
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #3599: Wrong search_path inside a function