Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 65A661337BCE; Wed, 19 Jan 2011 14:53:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 51961-02; Wed, 19 Jan 2011 18:53:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 9B31A1337B7E; Wed, 19 Jan 2011 14:53:27 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Wed, 19 Jan 2011 12:53:27 -0600 Message-Id: <4D36DEBE02000025000397FF@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Wed, 19 Jan 2011 12:53:18 -0600 From: "Kevin Grittner" To: "Thom Brown" Cc: "pgsql-docs" , "PostgreSQL-development" Subject: Re: [HACKERS] Couple document fixes References: <4D36D4F302000025000397F3@gw.wicourts.gov> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/16 X-Sequence-Number: 6308 Thom Brown 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(vector tsvector, weight "char") returns tsvector ./doc/src/sgml/datatype.sgml:1116: length might change in a future release. The type "char" ./doc/src/sgml/datatype.sgml:1134: "char" ./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: "char" ./doc/src/sgml/release-8.0.sgml:3389: "char" data type have been removed. ./doc/src/sgml/release-8.0.sgml:4460: "char" data type have been removed. ./doc/src/sgml/release-8.0.sgml:4466: to do arithmetic on a "char" column, you can cast it to ./doc/src/sgml/func.sgml:8462: setweight(tsvector, "char") ./doc/src/sgml/btree-gin.sgml:17: oid, money, "char", -Kevin