Thread: FW: Multiple character encodings within a single database/table?

FW: Multiple character encodings within a single database/table?

From
"Dann Corbit"
Date:
> -----Original Message-----
> From: Dann Corbit
> Sent: Monday, March 23, 2009 3:50 PM
> To: pgsql-general@postgresql.org
> Subject: Multiple character encodings within a single database/table?
>
> If I have the C locale, can I have multiple character encodings
within:
> 1.  A single database?
> 2.  A single table?
>
> More specifically, I would like to be able to have Unicode columns and
> ASCII text columns within the same table.  Is this possible?  If so,
> how do I achieve it?
>
> It was not clear to me from:
> http://www.postgresql.org/docs/current/static/multibyte.html
>
> It seems to me from this statement:
> "It can be overridden when you create a database, so you can have
> multiple databases each with a different character set."
> That it may be database wide, but I am not sure that it is not
possible
> to have both ordinary char and Unicode in the same table.
>
> Possible or not?

I know that this message is better placed on the general group, but I
got no reply in 24 hours.
So perhaps I can get a rise in hackers...


Re: FW: Multiple character encodings within a single database/table?

From
Bruce Momjian
Date:
Dann Corbit wrote:
> > -----Original Message-----
> > From: Dann Corbit
> > Sent: Monday, March 23, 2009 3:50 PM
> > To: pgsql-general@postgresql.org
> > Subject: Multiple character encodings within a single database/table?
> > 
> > If I have the C locale, can I have multiple character encodings
> within:
> > 1.  A single database?
> > 2.  A single table?
> > 
> > More specifically, I would like to be able to have Unicode columns and
> > ASCII text columns within the same table.  Is this possible?  If so,
> > how do I achieve it?
> > 
> > It was not clear to me from:
> > http://www.postgresql.org/docs/current/static/multibyte.html
> > 
> > It seems to me from this statement:
> > "It can be overridden when you create a database, so you can have
> > multiple databases each with a different character set."
> > That it may be database wide, but I am not sure that it is not
> possible
> > to have both ordinary char and Unicode in the same table.
> > 
> > Possible or not?
> 
> I know that this message is better placed on the general group, but I
> got no reply in 24 hours.
> So perhaps I can get a rise in hackers...

ASCII is a non-encoding, in my mind, so it can be safely used with any
other encoding in the same database or table.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +