X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0A816D1B170 for ; Fri, 16 Jul 2004 02:40:22 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48655-07 for ; Fri, 16 Jul 2004 05:40:18 +0000 (GMT) Received: from mail.svhost.com.ar (mail.svhost.com.ar [200.80.239.22]) by svr1.postgresql.org (Postfix) with ESMTP id DAB0DD1B16E for ; Fri, 16 Jul 2004 02:40:16 -0300 (ADT) Received: from sistemat.com.ar (devel.sistemat.com.ar [192.168.1.40]) by mail.svhost.com.ar (Postfix) with ESMTP id 98DF01E0D8; Fri, 16 Jul 2004 02:38:39 -0300 (ART) Message-ID: <40F76C67.8010008@sistemat.com.ar> Date: Fri, 16 Jul 2004 02:49:27 -0300 From: "Dario V. Fassi" Organization: SISTEMATICA ingenieria de software srl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: es, es-ar, en-us, en MIME-Version: 1.0 Cc: Oliver Jowett , Tom Lane , "pgsql-jdbc@postgresql.org" Subject: Re: Very strange Error in Updates - At last resolved ! References: <40F6172D.10301@sistemat.com.ar> <40F619A0.8030506@opencloud.com> <40F61CC2.5030704@sistemat.com.ar> <40F61F0E.6020907@opencloud.com> <20559.1089900977@sss.pgh.pa.us> <40F71495.20402@opencloud.com> <8982.1089935960@sss.pgh.pa.us> <40F71EB2.9080304@opencloud.com> <40F747BD.2070300@sistemat.com.ar> In-Reply-To: <40F747BD.2070300@sistemat.com.ar> Content-Type: multipart/alternative; boundary="------------000906070903080809040606" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.0 tagged_above=0.0 required=5.0 tests=HTML_20_30, HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: * X-Archive-Number: 200407/201 X-Sequence-Number: 10585 This is a multi-part message in MIME format. --------------000906070903080809040606 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit After try *all* versions of jdbc drivers I found that the problems disapear using: 1) DB with UNICODE encoding. 2) Jdbc Driver : pg74.214.jdbc2.jar (186948 bytes ) Thanks Oliver, Tom and Kris for your time and help. Dario V. Fassi wrote: > We do a ODBC program to migrate the DB (SQL_ASCII) to a DB with > UNICODE encoding . > > This DB in ODBC with set CLIENT_ENCODING='UNICODE' , work fine. > > 1) Now from a JDBC java program , we read a row that has a field > CALLE varchar(30) = 'ρρρρρρρρρρρρρρρρ' , > 2) then we do an Update of another field in the same row , > 3) then the untouched field ends CALLE varchar(30) = '' > > I'm absolutly lost in this problem. > > Dario. > > Oliver Jowett wrote: > >> Tom Lane wrote: >> >>> Oliver Jowett writes: >>> >>>> What about refusing to change client_encoding to something other >>>> than SQL_ASCII on SQL_ASCII databases? >>> >>> >>> >>> Not sure that would do anything very useful. People who aren't >>> thinking >>> about this probably aren't thinking about setting client_encoding >>> properly, either. >> >> >> I was thinking about it from the other angle -- clients that set >> client_encoding and expect the server to do the conversion (e.g. the >> JDBC driver) will see an error rather than bogus unconverted data. >> >> What does the server currently do if you ask for a client_encoding >> that isn't supported by the database encoding (e.g. LATIN1<->LATIN2)? >> It seems to me that SQL_ASCII is kinda-sorta-if-you-squint-a-bit like >> an encoding that doesn't support any client_encoding but SQL_ASCII. >> >> -O > --------------000906070903080809040606 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit After try  *all* versions of jdbc drivers I found that the problems disapear using:

1)  DB with UNICODE  encoding.
2) Jdbc Driver :      pg74.214.jdbc2.jar      (186948 bytes )

Thanks Oliver, Tom and Kris for your time and help.

Dario V. Fassi wrote:
We do a ODBC program to migrate the DB (SQL_ASCII) to a DB with UNICODE encoding .

This DB in ODBC with set CLIENT_ENCODING='UNICODE' , work fine.

1) Now from  a JDBC java program , we read a row that has a field  CALLE varchar(30) = 'ññññññññññññññññ' ,
2) then we do an Update of another field in the same row ,
3) then the untouched field ends CALLE varchar(30) = ''

I'm absolutly  lost in this problem.

Dario.

Oliver Jowett wrote:
Tom Lane wrote:
Oliver Jowett <oliver@opencloud.com> writes:

What about refusing to change client_encoding to something other than SQL_ASCII on SQL_ASCII databases?


Not sure that would do anything very useful.  People who aren't thinking
about this probably aren't thinking about setting client_encoding
properly, either.

I was thinking about it from the other angle -- clients that set client_encoding and expect the server to do the conversion (e.g. the JDBC driver) will see an error rather than bogus unconverted data.

What does the server currently do if you ask for a client_encoding that isn't supported by the database encoding (e.g. LATIN1<->LATIN2)? It seems to me that SQL_ASCII is kinda-sorta-if-you-squint-a-bit like an encoding that doesn't support any client_encoding but SQL_ASCII.

-O

--------------000906070903080809040606--