pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Equivalant of SQL Server's Nchar and NVARCHAR
4+ messages / 4 participants
[nested] [flat]

* Equivalant of SQL Server's Nchar and NVARCHAR
@ 2004-04-29 10:11 kumar <sgnerd@yahoo.com.sg>
  2004-04-29 13:05 ` Re: Equivalant of SQL Server's Nchar and NVARCHAR Karsten Hilbert <Karsten.Hilbert@gmx.net>
  2004-04-29 14:18 ` Re: Equivalant of SQL Server's Nchar and NVARCHAR Rob <pgadmin@itsbeen.sent.com>
  0 siblings, 2 replies; 4+ messages in thread

From: kumar @ 2004-04-29 10:11 UTC (permalink / raw)
  To: pgsql-sql

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Equivalant of SQL Server's Nchar and NVARCHAR
  2004-04-29 10:11 Equivalant of SQL Server's Nchar and NVARCHAR kumar <sgnerd@yahoo.com.sg>
@ 2004-04-29 13:05 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Karsten Hilbert @ 2004-04-29 13:05 UTC (permalink / raw)
  To: pgsql-sql

> Dear friends,
> Is there [...]

> Please shed some light.
http://www.postgresql.org/docs/7.4/static/index.html

> Thanks
You are welcome.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Equivalant of SQL Server's Nchar and NVARCHAR
  2004-04-29 10:11 Equivalant of SQL Server's Nchar and NVARCHAR kumar <sgnerd@yahoo.com.sg>
@ 2004-04-29 14:18 ` Rob <pgadmin@itsbeen.sent.com>
  2004-04-29 19:20   ` Re: Equivalant of SQL Server's Nchar and NVARCHAR Josh Berkus <josh@agliodbs.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Rob @ 2004-04-29 14:18 UTC (permalink / raw)
  To: kumar <sgnerd@yahoo.com.sg>; 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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Equivalant of SQL Server's Nchar and NVARCHAR
  2004-04-29 10:11 Equivalant of SQL Server's Nchar and NVARCHAR kumar <sgnerd@yahoo.com.sg>
  2004-04-29 14:18 ` Re: Equivalant of SQL Server's Nchar and NVARCHAR Rob <pgadmin@itsbeen.sent.com>
@ 2004-04-29 19:20   ` Josh Berkus <josh@agliodbs.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Josh Berkus @ 2004-04-29 19:20 UTC (permalink / raw)
  To: Rob <pgadmin@itsbeen.sent.com>; kumar <sgnerd@yahoo.com.sg>; pgsql-sql

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:

All of our TEXT datatypes are multibyte-capable, provided you've installed 
PostgreSQL correctly.    This includes:
TEXT (recommended)
VARCHAR
CHAR

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2004-04-29 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29 10:11 Equivalant of SQL Server's Nchar and NVARCHAR kumar <sgnerd@yahoo.com.sg>
2004-04-29 13:05 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
2004-04-29 14:18 ` Rob <pgadmin@itsbeen.sent.com>
2004-04-29 19:20   ` Josh Berkus <josh@agliodbs.com>

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