Re: Equivalant of SQL Server's Nchar and NVARCHAR - Mailing list pgsql-sql

From Rob
Subject Re: Equivalant of SQL Server's Nchar and NVARCHAR
Date
Msg-id 40910EBC.1090807@itsbeen.sent.com
Whole thread Raw
In response to Equivalant of SQL Server's Nchar and NVARCHAR  ("kumar" <sgnerd@yahoo.com.sg>)
Responses Re: Equivalant of SQL Server's Nchar and NVARCHAR
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Equivalant of SQL Server's Nchar and NVARCHAR
Next
From: Josh Berkus
Date:
Subject: Re: Use arrays or not?