Re: [HACKERS] Couple document fixes

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Thom Brown" <thom(at)linux(dot)com>
Cc: "pgsql-docs" <pgsql-docs(at)postgresql(dot)org>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Couple document fixes
Date: 2011-01-19 18:53:18
Message-ID: 4D36DEBE02000025000397FF@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Thom Brown <thom(at)linux(dot)com> wrote:

> relkind in the same table is the same type, but isn't displayed as
> "char" in the docs, and the same applies to many other system
tables.
> They would need changing too then.
>
> Examples are:
>
> pg_type.typtype
> pg_proc.provolatile
> pg_attribute.attstorage

That's a good point. Consistency would trump getting a single entry
right, for sure. I wonder, though, whether we shouldn't
consistently distinguish them. For one thing, I've seen multiple
posts where people were reporting "bugs" because of having confused
char with "char".

FWIW, \d shows:

Table "pg_catalog.pg_class"
Column | Type | Modifiers
-----------------+-----------+-----------
relname | name | not null
relnamespace | oid | not null
reltype | oid | not null
reloftype | oid | not null
relowner | oid | not null
relam | oid | not null
relfilenode | oid | not null
reltablespace | oid | not null
relpages | integer | not null
reltuples | real | not null
reltoastrelid | oid | not null
reltoastidxid | oid | not null
relhasindex | boolean | not null
relisshared | boolean | not null
relpersistence | "char" | not null
relkind | "char" | not null
relnatts | smallint | not null
relchecks | smallint | not null
relhasoids | boolean | not null
relhaspkey | boolean | not null
relhasexclusion | boolean | not null
relhasrules | boolean | not null
relhastriggers | boolean | not null
relhassubclass | boolean | not null
relfrozenxid | xid | not null
relacl | aclitem[] |
reloptions | text[] |
Indexes:
"pg_class_oid_index" UNIQUE, btree (oid)
"pg_class_relname_nsp_index" UNIQUE, btree (relname,
relnamespace)

Currently we don't seem to distinguish them in very many places in
the docs:

$ find -name '*.sgml' | xargs egrep -n '\"char\"'
./doc/src/sgml/textsearch.sgml:1271:setweight(<replaceable
class="PARAMETER">vector</replaceable> <type>tsvector</>,
<replaceable class="PARAMETER">weight</replaceable> <type>"char"</>)
returns <type>tsvector</>
./doc/src/sgml/datatype.sgml:1116: length might change in a
future release. The type <type>"char"</type>
./doc/src/sgml/datatype.sgml:1134:
<entry><type>"char"</type></entry>
./doc/src/sgml/release-old.sgml:4406:Add routines for single-byte
"char" type(Thomas)
./doc/src/sgml/release-old.sgml:4747:Make "char" type a synonym for
"char(1)" (actually implemented as bpchar)(Thomas)
./doc/src/sgml/xfunc.sgml:1794:
<entry><type>"char"</type></entry>
./doc/src/sgml/release-8.0.sgml:3389: <type>"char"</> data type
have been removed.
./doc/src/sgml/release-8.0.sgml:4460: <type>"char"</> data
type have been removed.
./doc/src/sgml/release-8.0.sgml:4466: to do arithmetic on a
<type>"char"</> column, you can cast it to
./doc/src/sgml/func.sgml:8462:
<literal><function>setweight(<type>tsvector</>,
<type>"char"</>)</function></literal>
./doc/src/sgml/btree-gin.sgml:17: <type>oid</>, <type>money</>,
<type>"char"</>,

-Kevin

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Aleksey Tsalolikhin 2011-01-19 21:01:42 Re: Addition to TOAST documentation in 8.4 comprehensive manual
Previous Message Thom Brown 2011-01-19 18:29:53 Re: [HACKERS] Couple document fixes

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-19 18:56:08 Re: Extending opfamilies for GIN indexes
Previous Message Bruce Momjian 2011-01-19 18:53:14 Use of O_DIRECT only for open_* sync options