BUG #13495: Postgres documentation consistently teaches 'bad' practice

Поиск
Список
Период
Сортировка
От grb@skogoglandskap.no
Тема BUG #13495: Postgres documentation consistently teaches 'bad' practice
Дата
Msg-id 20150709095259.15754.83737@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #13495: Postgres documentation consistently teaches 'bad' practice  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13495
Logged by:          Graeme Bell
Email address:      grb@skogoglandskap.no
PostgreSQL version: 9.3.9
Operating system:   Linux
Description:

Relates to a current thread on pgsql-performance.

The postgres documentation presently teaches bad practice to new programmers
by failing to use function volatility categories in examples throughout
most/all of the documentation.

Consequently, many new and existing PG users are writing code that performs
poorly and doesn't scale at all, and don't even know it.

For example: count the uses of volatility classes on these pages.

http://www.postgresql.org/docs/9.3/static/plpgsql-structure.html

http://www.postgresql.org/docs/9.3/static/plpgsql-declarations.html#PLPGSQL-DECLARATION-PARAMETERS

Proposed solution:

This issue is absolutely critical for performance and scalability of code,
therefore all of the PG example functions, particularly in the first few
chapters of the documentation, could be altered to demonstrate  correctly
written code in terms of good practice for performance and scability.

My feeling is that good practice should be naturally  acquired by the reader
as they read the first 20 pages of the manual.

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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: BUG #12824: Error during uninstall‏
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #13495: Postgres documentation consistently teaches 'bad' practice