Re: [HACKERS] A bug or a feature?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] A bug or a feature?
Дата
Msg-id 9306.943423660@sss.pgh.pa.us
обсуждение исходный текст
Ответ на A bug or a feature?  (Alessio Bragadini <alessio@albourne.com>)
Список pgsql-hackers
Alessio Bragadini <alessio@albourne.com> writes:
> We have a table with ~30 columns, named 'people' and we were going to
> create a view for all record with 'relationship' equal to 1. The
> database complains where using the '*' placeholder:
> albourne=> CREATE VIEW employees AS SELECT * FROM people WHERE
> relationship = 1; 
> ERROR:  DefineQueryRewrite: rule plan string too big.
> but accepts the same 30 columns on the command:

There is a limit on the length of rule plans :-(.  Jan has implemented
compression of rule plan strings as a partial workaround for 7.0, and
the final solution will come when we eliminate tuple length limits.

In the meantime, the interesting question is why two apparently
equivalent queries yield rule plans of different lengths.  As far as
I can tell, '*' and explicitly listing the fields *do* yield exactly
the same results.  My guess is that your query is right at the hairy
edge of the length limit, such that one or two characters more or less
make the difference.  The rule plan does include a couple of instances
of the name of the view, so if you used a longer view name in one case
than the other, that could explain why one worked and the other didn't.

If that's not it then I'm baffled...
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: AW: [HACKERS] Getting OID in psql of recent insert
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: pid file for postmaster?