Re: Difference between text and char(n)?

From: Doug McNaught <doug(at)wireboard(dot)com>
To: "Hillensbeck, Preston" <PHillensbeck(at)sfbcic(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Difference between text and char(n)?
Date: 2002-03-27 15:01:51
Message-ID: m3lmcegilc.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Hillensbeck, Preston" <PHillensbeck(at)sfbcic(dot)com> writes:

> Is there really that much difference between text and char(n)? Is the
> length of text dynamic to the data that you put in it, or is there some kind
> of fixed width associated with it?

'text' is unlimited (apart from the field size limit, which is pretty
large). 'char' is represented the same way internally as 'text', but
has extra bookkeeping for the padding and length checks so it's a
little slower IIRC.

-Doug
--
Doug McNaught Wireboard Industries http://www.wireboard.com/

Custom software development, systems and network consulting.
Java PostgreSQL Enhydra Python Zope Perl Apache Linux BSD...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew G. Hammond 2002-03-27 15:07:00 Re: [SQL] resetting sequence
Previous Message Darren Ferguson 2002-03-27 14:53:46 Re: View vs. direct Table access