Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: pg_class catalog question...


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: "Jim C. Nasby" <jnasby(at)pervasive(dot)com>
  • Cc: "Jonah H. Harris" <jonah(dot)harris(at)gmail(dot)com>, Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: pg_class catalog question...
  • Date: Fri, 31 Mar 2006 11:29:15 -0500
  • Message-id: <8997(dot)1143822555(at)sss(dot)pgh(dot)pa(dot)us>

"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> About the only reason I use CHAR in other databases systems is when I
> know that the field will always contain the same amount of data, ie:
> storing a SHA1. In these cases it's silly to have a 4 byte overhead to
> store length. I really wish CHAR in PostgreSQL worked this way, so it
> would be a welcome addition to have a type that did work this way. In
> fact, I'd argue that CHAR should be made to work that way, and what's
> currently called CHAR should be renamed for those who wish to use it.

This argument falls flat when you consider that the width of a CHAR
entry is measured in characters, not bytes, and therefore its physical
size is not fixed even if its logical width is.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group