charset/collation in values

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: charset/collation in values
Date: 2004-11-01 06:41:09
Message-ID: Pine.LNX.4.44.0411010718390.2015-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2004-11-01 06:58:30 Re: psql and schemas
Previous Message Bruce Momjian 2004-11-01 04:00:06 Re: [PATCHES] Open Items