FAQ

From a friendly Alexander Dememshin:

Hi!

I have tried:

create table tab (v1 char(4096), v2 char(4096), v3 char(4096));

Then:

insert into tab values('1');

OK

insert into tab values('1','2');

Tuple is too big: size 8256.

Well, I understand why, but type 'char' is *fixed* length type,
so even if I don't use some attributes, it *must* be inserted
with all spaces... At least, I expected this... In this case
I must get "tuple is too big" even if I will insert "empty"
record. It is not so - why?
Bruce Momjian wrote:

NULL has zero length.
I think Alexander is questioning the fact that postgres let him make a table
with three fields totaling 12k in size when the max tuple size is at about
8000 bytes or so now. Seems to me that "create table" code should check the
size of all attributes, at least when a size is given. For "text" and any
other types that don't need a fixed size at create time, this understandably
can't be done, but for other sized types, IMHO, it should.


Darren darrenk@insightdist.com

------------------------------

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 7 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedJun 19, '97 at 5:39p
activeJun 20, '97 at 7:36p
posts7
users4
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase