From: Rob <pgadmin@itsbeen.sent.com>
To: kumar <sgnerd@yahoo.com.sg>
To: pgsql-sql@postgresql.org
Subject: Re: Equivalant of SQL Server's Nchar and NVARCHAR
Date: Thu, 29 Apr 2004 07:18:36 -0700
Message-ID: <40910EBC.1090807@itsbeen.sent.com> (raw)
In-Reply-To: <011201c42dd2$69245f70$7502a8c0@hdsc.com>
References: <011201c42dd2$69245f70$7502a8c0@hdsc.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pgadmin@itsbeen.sent.com, sgnerd@yahoo.com.sg
Subject: Re: Equivalant of SQL Server's Nchar and NVARCHAR
In-Reply-To: <40910EBC.1090807@itsbeen.sent.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox