Re: [Solved] SQL Server to PostgreSQL

From: Jan Wieck <janwieck(at)Yahoo(dot)com>
To: Martin Christensen <knightsofspamalot-factotum(at)mail1(dot)stofanet(dot)dk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [Solved] SQL Server to PostgreSQL
Date: 2000-09-02 23:33:48
Message-ID: 200009022333.SAA20793@jupiter.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Martin Christensen wrote:
> >>>>> "Radoslaw" == Radoslaw Stachowiak <radek(at)alter(dot)pl> writes:
> Radoslaw> Does varchar(188) takes 188 bytes (+ bytes for length
> Radoslaw> storage) every time, no matter if it contains 'my text' or
> Radoslaw> 'my long 188 char text.....' ?
>
> The way I understand it varchar(n) is variable-length, while char(n)
> is fixed-lenght. Thus the behaviour you describe above is that of
> char(n).

Right for any pre-7.1 version.

From 7.1 on the system will try to compress all types
internally stored as variable length (char(), varchar(), text
and some more). So the real amount of bytes for a char(188)
will be "at maximum 192 - probably less".

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2000-09-02 23:53:48 Re: PL/Perl compilation error
Previous Message Tom Lane 2000-09-02 23:33:42 Re: PL/Perl compilation error

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2000-09-02 23:53:48 Re: PL/Perl compilation error
Previous Message Tom Lane 2000-09-02 23:33:42 Re: PL/Perl compilation error