X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 376EED1DA83 for ; Thu, 29 Apr 2004 11:19:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 04538-05 for ; Thu, 29 Apr 2004 11:19:30 -0300 (ADT) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by svr1.postgresql.org (Postfix) with ESMTP id 26C95D1CAA7 for ; Thu, 29 Apr 2004 11:19:26 -0300 (ADT) X-Sasl-enc: Xgx1gqECZjzQ9azXXF+I7w 1083248352 Received: from itsbeen.sent.com (unknown [198.144.200.210]) by www.fastmail.fm (Postfix) with ESMTP id 4DA65AC4BF6; Thu, 29 Apr 2004 10:19:11 -0400 (EDT) Message-ID: <40910EBC.1090807@itsbeen.sent.com> Date: Thu, 29 Apr 2004 07:18:36 -0700 From: Rob User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: kumar , pgsql-sql@postgresql.org Subject: Re: Equivalant of SQL Server's Nchar and NVARCHAR References: <011201c42dd2$69245f70$7502a8c0@hdsc.com> In-Reply-To: <011201c42dd2$69245f70$7502a8c0@hdsc.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/317 X-Sequence-Number: 17692 kumar wrote: > Dear friends, > Is there any equivalent datatype of SQL Server's NCHAR and NVARCHAR, > available with Postgres 7.3.4. I want to store characters, special > characters and Numbers. > Please shed some light. > > Thanks > Kumar I only only use ascii but... I believe postgresql varchar is the same as Oracle/Sybase/MS SQL nvarchar even though it doesn't explicitly say so here: http://www.postgresql.org/docs/7.4/static/datatype-character.html Here is a short example: create table nvctest ( utf8fld varchar(12) ); insert into nvctest select convert('PostgreSQL' using ascii_to_utf_8); select * from nvctest; text functions including encoding conversions are here: http://www.postgresql.org/docs/current/static/functions-string.html and http://www.postgresql.org/docs/current/static/functions-string.html#CONVERSION-NAMES Good Luck, Rob