Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E6D592E405F for ; Sat, 12 Jan 2008 18:21:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 28948-08-2 for ; Sat, 12 Jan 2008 18:20:57 -0400 (AST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id 6DB752E40A2 for ; Sat, 12 Jan 2008 18:21:02 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d37so2417702pye.29 for ; Sat, 12 Jan 2008 14:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=qkI1TjtOBPRc1J/pSAV+hTEHH+qrDF6wv2E/yDov1Tc=; b=USJ8RRPhdhE0dCqsebTwpHQiqx2y77UsZUa9nozBZyhnTbXgNHLKpNuYzBkC+KEN3l+J6ft5oodJzzZkS+OgU5V9PDh+s1vfDdPTyOwZ2jOC8xogbOOkHwnKuldW913IeDSm9LhS/Xelx+mmsDG/gWxt4JVUk2bSiSt9SaNHA9I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=N/kG6LyqQZciFjcw2b1brKKVaOK+cvSSMzcx1WTCyflBtjZBnQf7yGnRclCMSvfpj5ACSOocVFHxjnEtWv+yGh+iuXkuzlRnHuIUeBmJ+BmpwK8PpgmENKtOjlUyqwQd0Oamt4nDvaikEBZ5SI5L8zIHv4f3VBdFS9HHaNfhM4E= Received: by 10.64.148.8 with SMTP id v8mr10560734qbd.91.1200176461023; Sat, 12 Jan 2008 14:21:01 -0800 (PST) Received: by 10.64.242.15 with HTTP; Sat, 12 Jan 2008 14:21:00 -0800 (PST) Message-ID: <8078a1730801121421l1c9b90c1lc65d36cf6e752a6f@mail.gmail.com> Date: Sat, 12 Jan 2008 14:21:00 -0800 From: "Medi Montaseri" To: pgsql-sql@postgresql.org Subject: UTF8 encoding and non-text data types MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6479_26918667.1200176461009" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/104 X-Sequence-Number: 29957 ------=_Part_6479_26918667.1200176461009 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_6479_26918667.1200176461009 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
------=_Part_6479_26918667.1200176461009--