Re: Enum proposal / design

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Gregory Stark <gsstark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tom Dunstan <pgsql(at)tomd(dot)cc>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Enum proposal / design
Date: 2006-08-17 17:11:45
Message-ID: 20060817171145.GR21363@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 16, 2006 at 07:21:06PM -0400, Gregory Stark wrote:
> This is the same issue we have with char(n) and numeric(x,y) already. If we
> found a general solution for getting the type name to the enum would it also
> help getting the typmod to char(n) and numeric(x,y)? Would it let us store
> those as fixed sized data types?

Hopefully. It would be great to also have a fixed-width raw/bytea field.
See the recent discussions about adding a guid type, etc.

How about this for a TODO:

* Allow for field widths to be stored in the catalog instead of each tuple

Data types such as char are usually used when the user knows that a
field will always contain a fixed amount of data. In these cases,
our char implementation is wasteful, because the varlena header
always contains the same value. If there was a mechanism to obtain
field widths from the catalog there would be no need to store the
field width in each tuple. This would be useful for other types as
well (UUID and ENUM, for example).
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-08-17 17:12:08 Re: [HACKERS] selecting large result sets in psql using
Previous Message Bruce Momjian 2006-08-17 17:11:15 Re: Autovacuum on by default?