Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL7ep-00031D-Uz for pgsql-general@arkaria.postgresql.org; Sun, 05 Apr 2020 15:57:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jL7eo-0005cd-PI for pgsql-general@arkaria.postgresql.org; Sun, 05 Apr 2020 15:57:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL7eo-0005cW-Gw for pgsql-general@lists.postgresql.org; Sun, 05 Apr 2020 15:57:58 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL7eh-0001Gm-7X for pgsql-general@postgresql.org; Sun, 05 Apr 2020 15:57:57 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id C4CD0164F; Sun, 5 Apr 2020 18:57:47 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aXeC47KIICUL; Sun, 5 Apr 2020 18:57:45 +0300 (EEST) Received: from mail.hot.ee (hot-relayhost1.estpak.ee [213.180.2.79]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 94B0C1647; Sun, 5 Apr 2020 18:57:45 +0300 (EEST) Received: from dell2 (66-63-196-88.sta.estpak.ee [88.196.63.66]) (Authenticated sender: kobruleht2) by HOT-Relayhost1.estpak.ee (Postfix) with ESMTPSA id 48wJGZ56fnz2fF; Sun, 5 Apr 2020 18:57:41 +0300 (EEST) Message-ID: From: "Andrus" To: "Olivier Gautherot" Cc: "Laurenz Albe" , "pgsql-general" References: <45AE45823FB844ED80186DE14DCC5B14@dell2> <5DB1E9D2ADDB4BA0ABDF602235234BCC@dell2> <1e7536de1cb9e1097d1c8faf07a08bf66d8eeead.camel@cybertec.at> <7C033DCE8AD84649B95C5B367D6063B3@dell2> In-Reply-To: Subject: Re: Using compression on TCP transfer Date: Sun, 5 Apr 2020 18:57:36 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003E_01D60B7C.12819220" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk See on mitmeosaline MIME-vormingus sõnum. ------=_NextPart_000_003E_01D60B7C.12819220 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi! Thank you. >If you decide that it's without, you could apply a TRIM in a trigger on = each INSERT and UPDATE. Then, you could replace the table by a view of = the same name >and implement the TRIM on SELECT there. This way, you = don't have to touch anything in the application. How you provide sample code how to create view or othe method test so = that my select statement returns data. Currently select in code create table test ( test varchar ); insert into test values ('test'); select * from test where test =3D'test '; -- note trailing space does not return data. Andrus. ------=_NextPart_000_003E_01D60B7C.12819220 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!
Thank=20 you.

>If you decide that it's without, you could apply a TRIM in = a=20 trigger on each INSERT and UPDATE. Then, you could replace the table by = a view=20 of the same name >and implement the TRIM on SELECT there. This way, = you don't=20 have to touch anything in the application.
 
How you provide sample code how to create view or othe method test = so that=20 my select statement returns data.
 
Currently select in code
 
create table test ( test varchar );
insert into test = values=20 ('test');
select * from test where test =3D'test '; -- note trailing = space
 
does not return data.
 
Andrus.
------=_NextPart_000_003E_01D60B7C.12819220--