Skip site navigation (1) Skip section navigation (2)

UTF8 encoding and non-text data types

From: "Medi Montaseri" <montaseri(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: UTF8 encoding and non-text data types
Date: 2008-01-12 22:21:00
Message-ID: 8078a1730801121421l1c9b90c1lc65d36cf6e752a6f@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
I understand PG supports UTF-8 encoding and I have sucessfully inserted
Unicode text into columns. I was wondering about other data types such as
numbers, decimal, dates

That is, say I have a table t1 with
create table t1 { name text, cost decimal }
I can insert UTF8 text datatype into this table with no problem
But if my application attempts to insert numbers encloded in UTF8, then I
get wrong datatype error

Is the solution for the application layer (not database) to convert the
non-text UTF8 numbers to ASCII and then insert it into database ?

Thanks
Medi

pgsql-sql by date

Next:From: Steve MidgleyDate: 2008-01-14 04:51:08
Subject: Re: UTF8 encoding and non-text data types
Previous:From: Shane AmblerDate: 2008-01-12 10:30:44
Subject: Re: SQL question: Highest column value of unique column pairs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group