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

From: grb(at)skogoglandskap(dot)no
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13495: Postgres documentation consistently teaches 'bad' practice
Date: 2015-07-09 09:52:59
Message-ID: 20150709095259.15754.83737@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13495
Logged by: Graeme Bell
Email address: grb(at)skogoglandskap(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2015-07-09 10:07:30 Re: BUG #13495: Postgres documentation consistently teaches 'bad' practice
Previous Message John R Pierce 2015-07-08 17:08:13 Re: BUG #12824: Error during uninstall‏