userguide example fixes

From: "Gene Selkov, Jr(dot)" <selkovjr(at)mcs(dot)anl(dot)gov>
To: pgsql-general(at)postgresql(dot)org
Subject: userguide example fixes
Date: 1998-09-18 03:08:02
Message-ID: 199809180406.XAA10213@antares.mcs.anl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Because new keywords have been added since the original manuals were written, some of the examples may not work any longer, such as this:

(in the files known to me as userguide.ps or admin.html)

> This query lists all binary operators.
>
> SELECT o.oprname AS binary_op,
> left.typname AS left_opr,
> right.typname AS right_opr,
> result.typname AS return_type
> FROM pg_operator o, pg_type left, pg_type right, pg_type result
> WHERE o.oprkind = 'b' -- binary
> and o.oprleft = left.oid
> and o.oprright = right.oid
> and o.oprresult = result.oid
> ORDER BY left_opr, right_opr;

It works after replacing 'left' with 'l' and right with 'r'.

Since you are moving your docs to SGML, I would propose using a special data element (tag), or processing instruction, for examples. It can be used by an application to extract all example code and verify it together with the regression tests. That will encourage documentation maintainers to keep examples consistent with the changes in the backend.

--Gene

Browse pgsql-general by date

  From Date Subject
Next Message Howie 1998-09-18 03:23:41 slow queries
Previous Message Christophe Pettus 1998-09-17 19:48:08