[SQL] How to Insert and retrieve multilingual (Hindi "an Indian language") into PostgreSQL

2010-06-22 Thread venkat
Dear All,


  I want to insert and retrieve multilingual (Hindi) into database.is
PostgreSQL supports
that ?if it is ... please guide me how to enable multilingual in the table.


I am waiting for your great response.

Thanks and Regards,

Venkat


Re: [SQL] How to Insert and retrieve multilingual (Hindi "an Indian language") into PostgreSQL

2010-06-22 Thread Pavel Stehule
Hello

 PostgreSQL doesn't support multilangual tables now - etc it isn't
more than one collation per database. But you can store any langual
text when this language is supported by UTF8. Just use UTF8 encoding
for your database.

Regards
Pavel Stehule

see help for initdb and createdb commands




2010/6/22 venkat :
> Dear All,
>
>   I want to insert and retrieve multilingual (Hindi) into
> database.is PostgreSQL supports that ?if it is ... please guide me how to
> enable multilingual in the table.
>
>     I am waiting for your great response.
> Thanks and Regards,
> Venkat

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] ORDER BY is case insensitive

2010-06-22 Thread Bryan White
I was suprised to find out that ORDER BY is case insensitive.  Is
there a way to do a case sensitive ORDER BY clause?

This transcript demonstrates what I am seeing:

$ createdb bryan
$ psql bryan
psql (8.4.4)
Type "help" for help.

bryan=# create table t (f text);
CREATE TABLE
bryan=# insert into t (f) values ('a');
INSERT 0 1
bryan=# insert into t (f) values ('b');
INSERT 0 1
bryan=# insert into t (f) values ('c');
INSERT 0 1
bryan=# insert into t (f) values ('B');
INSERT 0 1
bryan=# select * from t order by f;
 f
---
 a
 b
 B
 c
(4 rows)

bryan=# \q
~  $ psql -l
 List of databases
  Name   |  Owner   | Encoding |  Collation  |Ctype|
Access privileges
-+--+--+-+-+---
 bryan   | bryan| UTF8 | en_US.UTF-8 | en_US.UTF-8 |
 postgres| postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
 template0   | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
   :
postgres=CTc/postgres
 template1   | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
   :
postgres=CTc/postgres
(4 rows)



-- 
Bryan White

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] ORDER BY is case insensitive

2010-06-22 Thread Gerardo Herzig
Bryan White wrote:
> I was suprised to find out that ORDER BY is case insensitive.  Is
> there a way to do a case sensitive ORDER BY clause?
> 
> This transcript demonstrates what I am seeing:
> 
> $ createdb bryan
> $ psql bryan
> psql (8.4.4)
> Type "help" for help.
> 
> bryan=# create table t (f text);
> CREATE TABLE
> bryan=# insert into t (f) values ('a');
> INSERT 0 1
> bryan=# insert into t (f) values ('b');
> INSERT 0 1
> bryan=# insert into t (f) values ('c');
> INSERT 0 1
> bryan=# insert into t (f) values ('B');
> INSERT 0 1
> bryan=# select * from t order by f;
>  f
> ---
>  a
>  b
>  B
>  c
> (4 rows)

Well. Im not really surprised. The column is text, so it sound
reasonable to order by its *text* representation. You may want to order
from its *ascii* value instead:

regression=# SELECT * from test order by ascii(data);
 data
--
 B
 a
 b
 c
(4 rows)

Or similar...Wich order are you expecting to see?

HTH
Gerardo

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] ORDER BY is case insensitive

2010-06-22 Thread Tom Lane
Bryan White  writes:
> I was suprised to find out that ORDER BY is case insensitive.  Is
> there a way to do a case sensitive ORDER BY clause?

Text sort order is determined by the rules of the locale you're using,
specifically the database's LC_COLLATE setting.  Most implementations of
en_US locale use "dictionary" ordering.  You might prefer C locale's
rules instead.

regards, tom lane

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] How to Insert and retrieve multilingual (Hindi "an Indian language") into PostgreSQL

2010-06-22 Thread silly sad

On 06/22/10 14:48, venkat wrote:


   I want to insert and retrieve multilingual (Hindi) into database.is
 PostgreSQL supports that ?if it is ... please guide
me how to enable multilingual in the table.


in addition to the previous advice
("just use UTF-8 for entire database cluster")
i notice
"multilingual" is not a data layer property at all -- it's application.

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql