Re: Charset/collate support and function parameters - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Charset/collate support and function parameters
Date
Msg-id 20041031.101733.35014451.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: Charset/collate support and function parameters  (Dennis Bjorklund <db@zigo.dhs.org>)
Responses Re: Charset/collate support and function parameters
List pgsql-hackers
> On Sat, 30 Oct 2004, Tom Lane wrote:
> 
> > > The alternative is storing the charset and collation inside each string.  
> > > That seems like a too big price to pay, it belong in the type.
> > 
> > No, the alternative you're proposing is too big a price to pay.
> 
> So you want to expand every string with 8 bytes (two oid's)?

For me that seems to be the right way. I'm not sure if two oids are
the right solution but we need to store extra info in varlena
structure to support charset/collation anyway. In my understanding
TOAST has already done in similar way.

Other than charset/collation we also need coercibility info to meet
with the SQL standard. This could only be represented in each text,
not by function parameters.

> Or special case the storing in tables so that you only store the text and
> not the charset/collation info?

On disk representation we don't need charset/collation since they will
be stored in probably pg_attribute. Coercibility info is not necessary
on disk too.
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Markus Bertheau
Date:
Subject: Re: array_to_column function
Next
From: Tatsuo Ishii
Date:
Subject: not null partial index?