pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [SQL] how to change  the type
Date: Thu, 6 Dec 2001 18:41:09 -0800 (PST)
Message-ID: <20011206183802.E30420-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <GNELIHDDFBOCMGBFGEFOEEKNCAAA.chriskl@familyhealth.com.au>


On Fri, 7 Dec 2001, Christopher Kings-Lynne wrote:

> OK, I'm kind of interested now in how the variable length attributes are
> actually stored on disk, that you are able to increase them, but not
> decrease?
>
> I would have thought the other way around?

IIRC, the values are stored as length + data.  I think char() might
do wierd things (I don't know if the trailing spaces are stored), but
varchar() and text should be expandable because anything that could have
fit before should still fit and look the same.  Going down is
problematic, because if you have a varchar(5) field where one value is say
'abcd' and you make it varchar(3) what happens?





view thread (5+ messages)  latest in thread

Message-ID: <20011206183802.E30420-100000@megazone23.bigpanda.com>
Permalink:  ../20011206183802.E30420-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20011206183802.E30420-100000@megazone23.bigpanda.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: sszabo@megazone23.bigpanda.com, chriskl@familyhealth.com.au, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] how to change  the type
  In-Reply-To: <20011206183802.E30420-100000@megazone23.bigpanda.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