charset/collation in values - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject charset/collation in values
Date
Msg-id Pine.LNX.4.44.0411010718390.2015-100000@zigo.dhs.org
Whole thread Raw
Responses Re: charset/collation in values  (Thomas Hallgren <thhal@mailblocks.com>)
Re: charset/collation in values  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
I've looked into storing charset/collation in the string values. This
means that we change varchar/text/BpChar to be structures that have a
charset oid field and a collation oid field, the rest of the Datum is the
string data.

Coercability I think one don't need to put in the Datum and it can be
stored in the Nodes. Charset/Collation need to be in the Datum since we
send that into functions as arguments.

Since we are changing what's stored in the Datum and the normal code saves
that on disk then we will end up with charset/collation stored on disk for
each value. If we want to avoid storing charset/collation both in the
column type and in each row, we would need an extra layer that transforms
the Datums before they are stored. As a first implementation it's easier
to just store everything.

For each type we need to have convertion functions to and from strings. 
Any suggestion of how to represent these as strings now when it's a string 
plus two oid's? This is a though one..

I have more comments/questions later on, but these are enough for one
mail.

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Open Items
Next
From: Neil Conway
Date:
Subject: Re: psql and schemas