Обсуждение: Re: [JDBC] Char(100) fields

Поиск
Список
Период
Сортировка

Re: [JDBC] Char(100) fields

От
"Antony Paul"
Дата:
Can you please tell me how to know the encoding of the databse ?

rgds
Antony Paul

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Waldomiro" <wmiro@ig.com.br>
Cc: <pgsql-jdbc@postgresql.org>
Sent: Thursday, September 23, 2004 1:20 AM
Subject: Re: [JDBC] Char(100) fields


> "Waldomiro" <wmiro@ig.com.br> writes:
> > now I have an error "value too long for type character(100)"
>
> Perhaps you are using unicode but forgot to set up the database with the
> proper encoding?  The DB is going to count bytes not characters if it's
> in SQL_ASCII encoding, for example.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

Re: [JDBC] Char(100) fields

От
Tom Lane
Дата:
"Antony Paul" <antonypaul24@hotmail.com> writes:
> Can you please tell me how to know the encoding of the databse ?

It's stored in pg_database ... psql's \l command is one easy way to
look.

            regards, tom lane