Skip site navigation (1) Skip section navigation (2)

varchar(), text,char() overhead

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: varchar(), text,char() overhead
Date: 1998-01-21 21:29:03
Message-ID: 199801212129.QAA25848@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Do people want the overhead of char(), varchar(), and text to be reduced
from 4-bytes to 2-bytes.  We store the length in this overhead, but
since we have a size limit on tuple size, we can't have a field over 8k
in size anyway.  Even if we up that to 32k for 6.3, we still only use 2
bytes.

I have added it to the TODO list.  Most of the code already supports it
by using VARSIZE and VARDATA macros.  Once the structure size changes,
the macros change too.  The only issue is places where they take the
first four bytes of the variable-length type and cast it to an int32,
which will not work in this case.  We have to change this so it uses the
macros too.

-- 
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us

pgsql-hackers by date

Next:From: Darren KingDate: 1998-01-21 22:14:52
Subject: Re: [HACKERS] varchar(), text,char() overhead
Previous:From: ocieDate: 1998-01-21 20:15:13
Subject: Re: [HACKERS] Re: [QUESTIONS] Business cases

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group