Re: Fixed length data types issue - Mailing list pgsql-hackers

From mark@mark.mielke.cc
Subject Re: Fixed length data types issue
Date
Msg-id 20060914215724.GA5322@mark.mielke.cc
Whole thread Raw
In response to Re: Fixed length data types issue  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
On Thu, Sep 14, 2006 at 10:21:30PM +0100, Gregory Stark wrote:
> >> One very nifty trick would be to fix "char" to act as CHAR(), and map
> >> CHAR(1) automatically to "char".
> > Sorry, probably a stupid idea considering multi-byte encodings.  I
> > suppose it could be an optimization for single-byte encodings, but that
> > seems very limiting.
> No, there are lots of single-byte encoding databases. And one day we'll have
> per-column encoding anyways and there are lots of databases that have columns
> that want to be one-character ascii encoded fields.
> 
> It's limited but I wouldn't say it's very limiting. In the cases where it
> doesn't apply there's no way out anyways. A UTF8 field will need a length
> header in some form.

Declaring a column as ASCII should allow for char(8) to mean the same
as byte(8) with text semantics. byte(8) shouldn't require a length
header. :-)

Cheers,
mark

-- 
mark@mielke.cc / markm@ncf.ca / markm@nortel.com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada
 One ring to rule them all, one ring to find them, one ring to bring them all                      and in the darkness
bindthem...
 
                          http://mark.mielke.cc/



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Mid cycle release?
Next
From: Jeff Davis
Date:
Subject: Re: [ADMIN] Vacuum error on database postgres