Re: Fixed length data types issue - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Fixed length data types issue
Date
Msg-id 87ejudqp6f.fsf@enterprisedb.com
Whole thread Raw
In response to Re: Fixed length data types issue  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:

> I don't think making a special typlen value just for a type that can
> store a single UTF-8 character is smart. I just can't see enough use to
> make it worth it.

Well there are lots of data types that can probably tell how long they are
based on internal state. And they can often store that state much more
compactly because they know more about the possible values. Consider for
example a network data type that can store either ipv4 or ipv6 addresses -- it
only needs a single bit to indicate the length.

While I agree that having to invoke data type specific functions just to do a
heap_deform_tuple would probably be far outside the bounds of possibility I
think it's still an interesting direction to ponder. Sometimes you reach
entirely practical ideas indirectly by brainstorming about outrageous ideas.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Fixed length data types issue
Next
From: Andrew - Supernews
Date:
Subject: Re: [ADMIN] Vacuum error on database postgres