pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Couple document fixes
20+ messages / 6 participants
[nested] [flat]

* Couple document fixes
@ 2011-01-19 18:05 Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-01-19 21:10 ` Re: [HACKERS] Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 20+ messages in thread

From: Thom Brown @ 2011-01-19 18:05 UTC (permalink / raw)
  To: pgsql-docs; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>

Hi,

I've attached a couple minor fixes to the docs.  One relating to
SECURITY LABEL and the other for pg_class.relpersistence

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

Attachments:

doc_fixes.patch (application/octet-stream, 1.1K) download diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index cd390d8..0703df6 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1646,7 +1646,7 @@ <row> <entry><structfield>relpersistence</structfield></entry> - <entry><type>bool</type></entry> + <entry><type>char</type></entry> <entry></entry> <entry> <literal>p</> = permanent table, <literal>u</> = unlogged table, diff --git a/doc/src/sgml/ref/security_label.sgml b/doc/src/sgml/ref/security_label.sgml index 74169d0..40ce331 100644 --- a/doc/src/sgml/ref/security_label.sgml +++ b/doc/src/sgml/ref/security_label.sgml @@ -58,7 +58,7 @@ SECURITY LABEL [ FOR <replaceable class="PARAMETER">provider</replaceable> ] ON </note> <para> - The label provider determines whether a given a label is valid and whether + The label provider determines whether a given label is valid and whether it is permissible to assign that label to a given object. The meaning of a given label is likewise at the discretion of the label provider. <productname>PostgreSQL</> places no restrictions on whether or how a
^ permalink raw reply [nested|flat] 20+ messages in thread

* Re: [HACKERS] Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
@ 2011-01-19 18:11 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-01-19 18:29   ` Re: [HACKERS] Couple document fixes Thom Brown <thom@linux.com>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  1 sibling, 2 replies; 20+ messages in thread

From: Kevin Grittner @ 2011-01-19 18:11 UTC (permalink / raw)
  To: Thom Brown <thom@linux.com>; pgsql-docs; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>

Thom Brown <thom@linux.com> wrote:
 
> I've attached a couple minor fixes to the docs.  One relating to
> SECURITY LABEL and the other for pg_class.relpersistence
 
relpersistence should be <type>"char"</type>, not <type>char</type>.
Oddly enough, there is a difference.
 
-Kevin



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: [HACKERS] Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2011-01-19 18:29   ` Thom Brown <thom@linux.com>
  2011-01-19 18:53     ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  1 sibling, 1 reply; 20+ messages in thread

From: Thom Brown @ 2011-01-19 18:29 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-docs; PostgreSQL-development <pgsql-hackers@postgresql.org>

On 19 January 2011 18:11, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:
> Thom Brown <thom@linux.com> wrote:
>
>> I've attached a couple minor fixes to the docs.  One relating to
>> SECURITY LABEL and the other for pg_class.relpersistence
>
> relpersistence should be <type>"char"</type>, not <type>char</type>.
> Oddly enough, there is a difference.
>
> -Kevin

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

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: [HACKERS] Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-01-19 18:29   ` Re: [HACKERS] Couple document fixes Thom Brown <thom@linux.com>
@ 2011-01-19 18:53     ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 20+ messages in thread

From: Kevin Grittner @ 2011-01-19 18:53 UTC (permalink / raw)
  To: Thom Brown <thom@linux.com>; +Cc: pgsql-docs; PostgreSQL-development <pgsql-hackers@postgresql.org>

Thom Brown <thom@linux.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



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: [HACKERS] Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2011-03-11 11:13   ` Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  1 sibling, 1 reply; 20+ messages in thread

From: Bruce Momjian @ 2011-03-11 11:13 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: Thom Brown <thom@linux.com>; pgsql-docs; PostgreSQL-development <pgsql-hackers@postgresql.org>

Kevin Grittner wrote:
> Thom Brown <thom@linux.com> wrote:
>  
> > I've attached a couple minor fixes to the docs.  One relating to
> > SECURITY LABEL and the other for pg_class.relpersistence
>  
> relpersistence should be <type>"char"</type>, not <type>char</type>.
> Oddly enough, there is a difference.

I am unsure on that one.  We have many 'char' mentions in catalog.sgml,
and I don't see any of them shown as '"char"'.  (Wow, we should have
just called this type char1, but I think that name came from Berkeley!) 
The big problem is that the pg_type name is really "char" _without_
quotes.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
@ 2011-03-11 15:23     ` Alvaro Herrera <alvherre@commandprompt.com>
  2011-03-11 15:40       ` Re: Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
  2011-09-05 18:21       ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  0 siblings, 2 replies; 20+ messages in thread

From: Alvaro Herrera @ 2011-03-11 15:23 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

Removing CC to pg-docs so that Robert reads it.

Excerpts from Bruce Momjian's message of vie mar 11 08:13:20 -0300 2011:
> Kevin Grittner wrote:

> > relpersistence should be <type>"char"</type>, not <type>char</type>.
> > Oddly enough, there is a difference.
> 
> I am unsure on that one.  We have many 'char' mentions in catalog.sgml,
> and I don't see any of them shown as '"char"'.  (Wow, we should have
> just called this type char1, but I think that name came from Berkeley!) 
> The big problem is that the pg_type name is really "char" _without_
> quotes.

One idea is to rename the type to something else.  We could keep "char"
as an alias for backwards compatibility, but use the new name in system
catalogs, and document it as the main name of the type.

Discussed the idea a bit on IM with Bruce, but couldn't find any really
good alternative.  Idea floated so far:

* byte (seems pretty decent to me)
* octet (though maybe people would expect it'd output as a number)
* char1 (looks ugly, but then we have int4 and so on)
* achar (this one is just plain weird)

None seems great.  Thoughts?

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
@ 2011-03-11 15:40       ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-03-11 15:51         ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  1 sibling, 1 reply; 20+ messages in thread

From: Tom Lane @ 2011-03-11 15:40 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Bruce Momjian <bruce@momjian.us>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

Alvaro Herrera <alvherre@commandprompt.com> writes:
> One idea is to rename the type to something else.  We could keep "char"
> as an alias for backwards compatibility, but use the new name in system
> catalogs, and document it as the main name of the type.

We don't have type aliases...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-03-11 15:40       ` Re: Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-03-11 15:51         ` Alvaro Herrera <alvherre@commandprompt.com>
  2011-03-11 16:01           ` Re: Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 20+ messages in thread

From: Alvaro Herrera @ 2011-03-11 15:51 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruce Momjian <bruce@momjian.us>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

Excerpts from Tom Lane's message of vie mar 11 12:40:50 -0300 2011:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > One idea is to rename the type to something else.  We could keep "char"
> > as an alias for backwards compatibility, but use the new name in system
> > catalogs, and document it as the main name of the type.
> 
> We don't have type aliases...

I meant the conversion we do from a certain name (say because it's the
SQL-mandated name for the type) to the internal name, such as mapping
integer to int4.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-03-11 15:40       ` Re: Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
  2011-03-11 15:51         ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
@ 2011-03-11 16:01           ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-03-11 16:08             ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 20+ messages in thread

From: Tom Lane @ 2011-03-11 16:01 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Bruce Momjian <bruce@momjian.us>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Tom Lane's message of vie mar 11 12:40:50 -0300 2011:
>> Alvaro Herrera <alvherre@commandprompt.com> writes:
>>> One idea is to rename the type to something else.  We could keep "char"
>>> as an alias for backwards compatibility, but use the new name in system
>>> catalogs, and document it as the main name of the type.

>> We don't have type aliases...

> I meant the conversion we do from a certain name (say because it's the
> SQL-mandated name for the type) to the internal name, such as mapping
> integer to int4.

That works for keywords.  "char" is, by definition, not a keyword.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-03-11 15:40       ` Re: Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
  2011-03-11 15:51         ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-03-11 16:01           ` Re: Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-03-11 16:08             ` Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 0 replies; 20+ messages in thread

From: Alvaro Herrera @ 2011-03-11 16:08 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruce Momjian <bruce@momjian.us>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

Excerpts from Tom Lane's message of vie mar 11 13:01:06 -0300 2011:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Excerpts from Tom Lane's message of vie mar 11 12:40:50 -0300 2011:
> >> Alvaro Herrera <alvherre@commandprompt.com> writes:
> >>> One idea is to rename the type to something else.  We could keep "char"
> >>> as an alias for backwards compatibility, but use the new name in system
> >>> catalogs, and document it as the main name of the type.
> 
> >> We don't have type aliases...
> 
> > I meant the conversion we do from a certain name (say because it's the
> > SQL-mandated name for the type) to the internal name, such as mapping
> > integer to int4.
> 
> That works for keywords.  "char" is, by definition, not a keyword.

Oh.  Right, of course.

Seems the only option is to continue living with it.

(Well actually the other option would be to rename it and break
backwards compatibility.  I'm not sure anyone is going to be happy with
that though.)

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
@ 2011-09-05 18:21       ` Bruce Momjian <bruce@momjian.us>
  2011-09-05 18:36         ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-05 23:29         ` Re: Couple document fixes David Fetter <david@fetter.org>
  1 sibling, 2 replies; 20+ messages in thread

From: Bruce Momjian @ 2011-09-05 18:21 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

Alvaro Herrera wrote:
> Removing CC to pg-docs so that Robert reads it.
> 
> Excerpts from Bruce Momjian's message of vie mar 11 08:13:20 -0300 2011:
> > Kevin Grittner wrote:
> 
> > > relpersistence should be <type>"char"</type>, not <type>char</type>.
> > > Oddly enough, there is a difference.
> > 
> > I am unsure on that one.  We have many 'char' mentions in catalog.sgml,
> > and I don't see any of them shown as '"char"'.  (Wow, we should have
> > just called this type char1, but I think that name came from Berkeley!) 
> > The big problem is that the pg_type name is really "char" _without_
> > quotes.
> 
> One idea is to rename the type to something else.  We could keep "char"
> as an alias for backwards compatibility, but use the new name in system
> catalogs, and document it as the main name of the type.
> 
> Discussed the idea a bit on IM with Bruce, but couldn't find any really
> good alternative.  Idea floated so far:
> 
> * byte (seems pretty decent to me)
> * octet (though maybe people would expect it'd output as a number)
> * char1 (looks ugly, but then we have int4 and so on)
> * achar (this one is just plain weird)
> 
> None seems great.  Thoughts?

Any new ideas on how to document our "char" data type?

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-05 18:21       ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
@ 2011-09-05 18:36         ` Alvaro Herrera <alvherre@commandprompt.com>
  1 sibling, 0 replies; 20+ messages in thread

From: Alvaro Herrera @ 2011-09-05 18:36 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

Excerpts from Bruce Momjian's message of lun sep 05 15:21:46 -0300 2011:
> Alvaro Herrera wrote:

> > Discussed the idea a bit on IM with Bruce, but couldn't find any really
> > good alternative.  Idea floated so far:
> > 
> > * byte (seems pretty decent to me)
> > * octet (though maybe people would expect it'd output as a number)
> > * char1 (looks ugly, but then we have int4 and so on)
> > * achar (this one is just plain weird)
> > 
> > None seems great.  Thoughts?
> 
> Any new ideas on how to document our "char" data type?

I think part of the problem is that this only seems to bother patch
developers, and only until they become aware of the issue.  After that,
it just becomes a known gotcha that's easy to work around.  Thus,
there's not much interest in spending a lot of time fixing it.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-05 18:21       ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
@ 2011-09-05 23:29         ` David Fetter <david@fetter.org>
  2011-09-05 23:33           ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  1 sibling, 1 reply; 20+ messages in thread

From: David Fetter @ 2011-09-05 23:29 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

On Mon, Sep 05, 2011 at 02:21:46PM -0400, Bruce Momjian wrote:
> Alvaro Herrera wrote:
> > Removing CC to pg-docs so that Robert reads it.
> > 
> > Excerpts from Bruce Momjian's message of vie mar 11 08:13:20 -0300 2011:
> > > Kevin Grittner wrote:
> > 
> > > > relpersistence should be <type>"char"</type>, not
> > > > <type>char</type>.  Oddly enough, there is a difference.
> > > 
> > > I am unsure on that one.  We have many 'char' mentions in
> > > catalog.sgml, and I don't see any of them shown as '"char"'.
> > > (Wow, we should have just called this type char1, but I think
> > > that name came from Berkeley!) The big problem is that the
> > > pg_type name is really "char" _without_ quotes.
> > 
> > One idea is to rename the type to something else.  We could keep
> > "char" as an alias for backwards compatibility, but use the new
> > name in system catalogs, and document it as the main name of the
> > type.
> > 
> > Discussed the idea a bit on IM with Bruce, but couldn't find any
> > really good alternative.  Idea floated so far:
> > 
> > * byte (seems pretty decent to me) * octet (though maybe people
> > would expect it'd output as a number) * char1 (looks ugly, but
> > then we have int4 and so on) * achar (this one is just plain
> > weird)
> > 
> > None seems great.  Thoughts?
> 
> Any new ideas on how to document our "char" data type?

What say we document it as deprecated and remove the silly thing over
the next three releases or so?  It's deep in the realm of
micro-optimization, and of a kind we well and truly don't need any
more, assuming we ever did.

Alternate proposals would involve a more aggressive deprecation and
removal schedule. ;)

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-05 18:21       ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-09-05 23:29         ` Re: Couple document fixes David Fetter <david@fetter.org>
@ 2011-09-05 23:33           ` Bruce Momjian <bruce@momjian.us>
  2011-09-06 00:05             ` Re: Couple document fixes David Fetter <david@fetter.org>
  0 siblings, 1 reply; 20+ messages in thread

From: Bruce Momjian @ 2011-09-05 23:33 UTC (permalink / raw)
  To: David Fetter <david@fetter.org>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

David Fetter wrote:
> > > > I am unsure on that one.  We have many 'char' mentions in
> > > > catalog.sgml, and I don't see any of them shown as '"char"'.
> > > > (Wow, we should have just called this type char1, but I think
> > > > that name came from Berkeley!) The big problem is that the
> > > > pg_type name is really "char" _without_ quotes.
> > > 
> > > One idea is to rename the type to something else.  We could keep
> > > "char" as an alias for backwards compatibility, but use the new
> > > name in system catalogs, and document it as the main name of the
> > > type.
> > > 
> > > Discussed the idea a bit on IM with Bruce, but couldn't find any
> > > really good alternative.  Idea floated so far:
> > > 
> > > * byte (seems pretty decent to me) * octet (though maybe people
> > > would expect it'd output as a number) * char1 (looks ugly, but
> > > then we have int4 and so on) * achar (this one is just plain
> > > weird)
> > > 
> > > None seems great.  Thoughts?
> > 
> > Any new ideas on how to document our "char" data type?
> 
> What say we document it as deprecated and remove the silly thing over
> the next three releases or so?  It's deep in the realm of
> micro-optimization, and of a kind we well and truly don't need any
> more, assuming we ever did.
> 
> Alternate proposals would involve a more aggressive deprecation and
> removal schedule. ;)

Uh, pg_class uses it:

 relpersistence | "char"    | not null
 relkind        | "char"    | not null

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-05 18:21       ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-09-05 23:29         ` Re: Couple document fixes David Fetter <david@fetter.org>
  2011-09-05 23:33           ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
@ 2011-09-06 00:05             ` David Fetter <david@fetter.org>
  2011-09-06 01:07               ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 20+ messages in thread

From: David Fetter @ 2011-09-06 00:05 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

On Mon, Sep 05, 2011 at 07:33:09PM -0400, Bruce Momjian wrote:
> David Fetter wrote:
> > > > > I am unsure on that one.  We have many 'char' mentions in
> > > > > catalog.sgml, and I don't see any of them shown as '"char"'.
> > > > > (Wow, we should have just called this type char1, but I think
> > > > > that name came from Berkeley!) The big problem is that the
> > > > > pg_type name is really "char" _without_ quotes.
> > > > 
> > > > One idea is to rename the type to something else.  We could keep
> > > > "char" as an alias for backwards compatibility, but use the new
> > > > name in system catalogs, and document it as the main name of the
> > > > type.
> > > > 
> > > > Discussed the idea a bit on IM with Bruce, but couldn't find any
> > > > really good alternative.  Idea floated so far:
> > > > 
> > > > * byte (seems pretty decent to me) * octet (though maybe people
> > > > would expect it'd output as a number) * char1 (looks ugly, but
> > > > then we have int4 and so on) * achar (this one is just plain
> > > > weird)
> > > > 
> > > > None seems great.  Thoughts?
> > > 
> > > Any new ideas on how to document our "char" data type?
> > 
> > What say we document it as deprecated and remove the silly thing over
> > the next three releases or so?  It's deep in the realm of
> > micro-optimization, and of a kind we well and truly don't need any
> > more, assuming we ever did.
> > 
> > Alternate proposals would involve a more aggressive deprecation and
> > removal schedule. ;)
> 
> Uh, pg_class uses it:
> 
>  relpersistence | "char"    | not null
>  relkind        | "char"    | not null
> 

Interesting. :)

Now that you mention it...

SELECT
    table_schema, table_name, column_name
FROM
    information_schema.columns
WHERE
    data_type = '"char"';
 table_schema |   table_name   |  column_name  
--------------+----------------+---------------
 pg_catalog   | pg_proc        | provolatile
 pg_catalog   | pg_type        | typtype
 pg_catalog   | pg_type        | typcategory
 pg_catalog   | pg_type        | typdelim
 pg_catalog   | pg_type        | typalign
 pg_catalog   | pg_type        | typstorage
 pg_catalog   | pg_attribute   | attstorage
 pg_catalog   | pg_attribute   | attalign
 pg_catalog   | pg_class       | relkind
 pg_catalog   | pg_constraint  | contype
 pg_catalog   | pg_constraint  | confupdtype
 pg_catalog   | pg_constraint  | confdeltype
 pg_catalog   | pg_constraint  | confmatchtype
 pg_catalog   | pg_operator    | oprkind
 pg_catalog   | pg_rewrite     | ev_type
 pg_catalog   | pg_rewrite     | ev_enabled
 pg_catalog   | pg_trigger     | tgenabled
 pg_catalog   | pg_cast        | castcontext
 pg_catalog   | pg_cast        | castmethod
 pg_catalog   | pg_depend      | deptype
 pg_catalog   | pg_shdepend    | deptype
 pg_catalog   | pg_default_acl | defaclobjtype
(22 rows)

On brief inspection, it appears that each of these would be better
served, at least functionally, with some kind of enumerated type.
Might it be worth trying to micro-optimize this case for a one-byte
enum?  Or maybe something like the varvarlena pattern?

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-05 18:21       ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-09-05 23:29         ` Re: Couple document fixes David Fetter <david@fetter.org>
  2011-09-05 23:33           ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-09-06 00:05             ` Re: Couple document fixes David Fetter <david@fetter.org>
@ 2011-09-06 01:07               ` Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-06 04:22                 ` Re: Couple document fixes David Fetter <david@fetter.org>
  0 siblings, 1 reply; 20+ messages in thread

From: Alvaro Herrera @ 2011-09-06 01:07 UTC (permalink / raw)
  To: David Fetter <david@fetter.org>; +Cc: Bruce Momjian <bruce@momjian.us>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

Excerpts from David Fetter's message of lun sep 05 21:05:10 -0300 2011:

> On brief inspection, it appears that each of these would be better
> served, at least functionally, with some kind of enumerated type.
> Might it be worth trying to micro-optimize this case for a one-byte
> enum?  Or maybe something like the varvarlena pattern?

What would be the point?  It works pretty well already.  It doesn't need
fixing.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-05 18:21       ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-09-05 23:29         ` Re: Couple document fixes David Fetter <david@fetter.org>
  2011-09-05 23:33           ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-09-06 00:05             ` Re: Couple document fixes David Fetter <david@fetter.org>
  2011-09-06 01:07               ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
@ 2011-09-06 04:22                 ` David Fetter <david@fetter.org>
  2011-09-06 15:19                   ` Re: Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 20+ messages in thread

From: David Fetter @ 2011-09-06 04:22 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Bruce Momjian <bruce@momjian.us>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

On Mon, Sep 05, 2011 at 10:07:29PM -0300, Alvaro Herrera wrote:
> Excerpts from David Fetter's message of lun sep 05 21:05:10 -0300 2011:
> 
> > On brief inspection, it appears that each of these would be better
> > served, at least functionally, with some kind of enumerated type.
> > Might it be worth trying to micro-optimize this case for a one-byte
> > enum?  Or maybe something like the varvarlena pattern?
> 
> What would be the point?

Removing the legacy "char" type, per original post. :)

> It works pretty well already.  It doesn't need fixing.

We've made changes as big on aesthetic grounds before, and if the
change results in an enum type optimized for space efficiency, that's
all to the good.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 18:11 ` Re: [HACKERS] Couple document fixes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-03-11 11:13   ` Re: [HACKERS] Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-03-11 15:23     ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-05 18:21       ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-09-05 23:29         ` Re: Couple document fixes David Fetter <david@fetter.org>
  2011-09-05 23:33           ` Re: Couple document fixes Bruce Momjian <bruce@momjian.us>
  2011-09-06 00:05             ` Re: Couple document fixes David Fetter <david@fetter.org>
  2011-09-06 01:07               ` Re: Couple document fixes Alvaro Herrera <alvherre@commandprompt.com>
  2011-09-06 04:22                 ` Re: Couple document fixes David Fetter <david@fetter.org>
@ 2011-09-06 15:19                   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2011-09-06 15:19 UTC (permalink / raw)
  To: David Fetter <david@fetter.org>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; Bruce Momjian <bruce@momjian.us>; Kevin Grittner <kevin.grittner@wicourts.gov>; Thom Brown <thom@linux.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>

David Fetter <david@fetter.org> writes:
> On Mon, Sep 05, 2011 at 10:07:29PM -0300, Alvaro Herrera wrote:
>> What would be the point?

> Removing the legacy "char" type, per original post. :)

Removing it is the wrong solution.

The idea of renaming it to char1 might be an appropriate balance of pain
versus benefit.  Or perhaps not; I'd want to see a proposed patch before
committing to doing anything here.

> We've made changes as big on aesthetic grounds before, and if the
> change results in an enum type optimized for space efficiency, that's
> all to the good.

That's a pipe dream.  You can't use enums in catalogs that underlie the
enum implementation.  Possibly you could kluge something so that there
are phony entries in pg_enum reflecting the hard-wired values that the C
code uses, but I entirely fail to see any point in such a thing.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: [HACKERS] Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
@ 2011-01-19 21:10 ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-19 21:11   ` Re: [HACKERS] Couple document fixes Thom Brown <thom@linux.com>
  1 sibling, 1 reply; 20+ messages in thread

From: Tom Lane @ 2011-01-19 21:10 UTC (permalink / raw)
  To: Thom Brown <thom@linux.com>; +Cc: pgsql-docs; PostgreSQL-development <pgsql-hackers@postgresql.org>

Thom Brown <thom@linux.com> writes:
> I've attached a couple minor fixes to the docs.  One relating to
> SECURITY LABEL and the other for pg_class.relpersistence

Applied, thanks.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: [HACKERS] Couple document fixes
  2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
  2011-01-19 21:10 ` Re: [HACKERS] Couple document fixes Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-01-19 21:11   ` Thom Brown <thom@linux.com>
  0 siblings, 0 replies; 20+ messages in thread

From: Thom Brown @ 2011-01-19 21:11 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs; PostgreSQL-development <pgsql-hackers@postgresql.org>

On 19 January 2011 21:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thom Brown <thom@linux.com> writes:
>> I've attached a couple minor fixes to the docs.  One relating to
>> SECURITY LABEL and the other for pg_class.relpersistence
>
> Applied, thanks.

Cheers Mr Lane.

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935



^ permalink  raw  reply  [nested|flat] 20+ messages in thread


end of thread, other threads:[~2011-09-06 15:19 UTC | newest]

Thread overview: 20+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-01-19 18:05 Couple document fixes Thom Brown <thom@linux.com>
2011-01-19 18:11 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-01-19 18:29   ` Thom Brown <thom@linux.com>
2011-01-19 18:53     ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-03-11 11:13   ` Bruce Momjian <bruce@momjian.us>
2011-03-11 15:23     ` Alvaro Herrera <alvherre@commandprompt.com>
2011-03-11 15:40       ` Tom Lane <tgl@sss.pgh.pa.us>
2011-03-11 15:51         ` Alvaro Herrera <alvherre@commandprompt.com>
2011-03-11 16:01           ` Tom Lane <tgl@sss.pgh.pa.us>
2011-03-11 16:08             ` Alvaro Herrera <alvherre@commandprompt.com>
2011-09-05 18:21       ` Bruce Momjian <bruce@momjian.us>
2011-09-05 18:36         ` Alvaro Herrera <alvherre@commandprompt.com>
2011-09-05 23:29         ` David Fetter <david@fetter.org>
2011-09-05 23:33           ` Bruce Momjian <bruce@momjian.us>
2011-09-06 00:05             ` David Fetter <david@fetter.org>
2011-09-06 01:07               ` Alvaro Herrera <alvherre@commandprompt.com>
2011-09-06 04:22                 ` David Fetter <david@fetter.org>
2011-09-06 15:19                   ` Tom Lane <tgl@sss.pgh.pa.us>
2011-01-19 21:10 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-01-19 21:11   ` Thom Brown <thom@linux.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox