pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedChar(100) fields
4+ messages / 3 participants
[nested] [flat]
* Char(100) fields
@ 2004-09-22 18:27 Waldomiro <wmiro@ig.com.br>
2004-09-22 19:50 ` Re: Char(100) fields Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Waldomiro @ 2004-09-22 18:27 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I have some char(100) fields.
I was using postgre 7.2 and now I'm using 7.4.
before 7.2 I never had an error inserting some data in a char(100) field.
now I have an error "value too long for type character(100)"
this error ocurrs when I insert some string which has size 100, if I insert some string which has size 99, the error doesn't came.
Is it a bug?
there is a detail, when I do that insert inside a psql program, the error doesn't came, it came only when I do the insert inside a java program.
I think it is a driver problem.
There is someone who have already this kind of problem?
SHX INFORMÁTICA LTDA.
Waldomiro Caraiani
Desenvolvimento de Produto
+ 55 11 5581 1551
wmiro@shx.com.br
www.shx.com.br =
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Char(100) fields
2004-09-22 18:27 Char(100) fields Waldomiro <wmiro@ig.com.br>
@ 2004-09-22 19:50 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-09-23 03:57 ` Re: [JDBC] Char(100) fields Antony Paul <antonypaul24@hotmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2004-09-22 19:50 UTC (permalink / raw)
To: Waldomiro <wmiro@ig.com.br>; +Cc: pgsql-jdbc
"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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [JDBC] Char(100) fields
2004-09-22 18:27 Char(100) fields Waldomiro <wmiro@ig.com.br>
2004-09-22 19:50 ` Re: Char(100) fields Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-09-23 03:57 ` Antony Paul <antonypaul24@hotmail.com>
2004-09-23 04:02 ` Re: [JDBC] Char(100) fields Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Antony Paul @ 2004-09-23 03:57 UTC (permalink / raw)
To: pgsql-general <pgsql-general@postgresql.org>
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)
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [JDBC] Char(100) fields
2004-09-22 18:27 Char(100) fields Waldomiro <wmiro@ig.com.br>
2004-09-22 19:50 ` Re: Char(100) fields Tom Lane <tgl@sss.pgh.pa.us>
2004-09-23 03:57 ` Re: [JDBC] Char(100) fields Antony Paul <antonypaul24@hotmail.com>
@ 2004-09-23 04:02 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2004-09-23 04:02 UTC (permalink / raw)
To: Antony Paul <antonypaul24@hotmail.com>; +Cc: pgsql-general <pgsql-general@postgresql.org>
"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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2004-09-23 04:02 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 18:27 Char(100) fields Waldomiro <wmiro@ig.com.br>
2004-09-22 19:50 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-09-23 03:57 ` Antony Paul <antonypaul24@hotmail.com>
2004-09-23 04:02 ` Tom Lane <tgl@sss.pgh.pa.us>
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