Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9BE9963380D for ; Mon, 22 Mar 2010 18:51:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52925-03 for ; Mon, 22 Mar 2010 21:51:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from delta01.pnet.xcon.it (delta01.pnet.xcon.it [62.48.53.16]) by mail.postgresql.org (Postfix) with ESMTP id D33FD63241A for ; Mon, 22 Mar 2010 18:51:03 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by delta01.pnet.xcon.it (Postfix) with ESMTP id B0F7E180A6C0; Mon, 22 Mar 2010 22:51:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at delta01.pnet.xcon.it Received: from delta01.pnet.xcon.it ([127.0.0.1]) by localhost (delta01.pnet.xcon.it [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EJkmezkXemjN; Mon, 22 Mar 2010 22:50:58 +0100 (CET) Received: from macbook-di-gabriele-bartolini.local (host235-121-dynamic.47-79-r.retail.telecomitalia.it [79.47.121.235]) (Authenticated sender: gabriele.bartolini@devise.it) by delta01.pnet.xcon.it (Postfix) with ESMTPSA id 15B1D1808DE8; Mon, 22 Mar 2010 22:50:54 +0100 (CET) Message-ID: <4BA7E632.1080608@2ndQuadrant.it> Date: Mon, 22 Mar 2010 22:50:42 +0100 From: Gabriele Bartolini User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: =?windows-1252?Q?I=F1igo_Martinez_Lasala?= CC: pgsql-admin@postgresql.org Subject: Re: Bad encoded chars in being inserted into database References: <050f01cac99c$7dafe100$790fa300$@com> In-Reply-To: <050f01cac99c$7dafe100$790fa300$@com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/155 X-Sequence-Number: 33954 Hi, > > I agree with this postgres policy, but what I don’t is that you can > INSERT them via application. That is, no bad characters should be > inserted into database. The check should be made for both import and > insert procedures so no bad chars would appear into database. > Could you please tell us which PostgreSQL version you are currently using? Also it would be useful to know: * which is your database encoding? * which is the client_encoding setting you are using? In general, what you are saying suggests me that you are using the SQL_ASCII encoding at some stage in your session (either on the server side or the client side). However, before I go on, please answer the above questions. Thanks, Gabriele -- Gabriele Bartolini - 2ndQuadrant Italia PostgreSQL Training, Services and Support gabriele.bartolini@2ndQuadrant.it | www.2ndQuadrant.it