pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: Decibel! <decibel@decibel.org>
Cc: Stefan Arentz <stefan.arentz@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Speeding up schema changes
Date: Wed, 19 Sep 2007 18:43:57 +0100
Message-ID: <87bqbyim8y.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <FC6AC0ED-3C3B-41F4-A6DA-75C1F0B34042@decibel.org>
References: <adf34c300709030422p7a5bf9ban915c01547c3cb008@mail.gmail.com>
	<874pic0way.fsf@oxford.xeocode.com>
	<FC6AC0ED-3C3B-41F4-A6DA-75C1F0B34042@decibel.org>

"Decibel!" <decibel@decibel.org> writes:

> On Sep 3, 2007, at 7:26 AM, Gregory Stark wrote:
>> Also, incidentally do you have a good reason to use CHAR instead of  varchar
>> or
>> text? char(64) will take 64 bytes (actually 68 bytes in 8.2) even  if you
>> don't
>> store anything more in it. text or varchar will take only as many  bytes as
>> the
>> data you're storing (plus 4 bytes).
>
> Hrm, do we actually pad before storing? ISTM we should really do that  the
> other way around...

Yes we do. And it isn't really fixable either. The problem is the familiar old
problem that in Postgres the typmod is not really part of the type and not
always available when we need it to interpret the datum.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com



view thread (4+ messages)

Message-ID: <87bqbyim8y.fsf@oxford.xeocode.com>
Permalink:  ../87bqbyim8y.fsf@oxford.xeocode.com/
Also on:    postgresql.org/message-id/87bqbyim8y.fsf@oxford.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: stark@enterprisedb.com, decibel@decibel.org, stefan.arentz@gmail.com
  Subject: Re: Speeding up schema changes
  In-Reply-To: <87bqbyim8y.fsf@oxford.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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