X-Original-To: pgsql-general-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 7EDEE9FB263 for ; Fri, 11 Aug 2006 10:05:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 85606-04 for ; Fri, 11 Aug 2006 13:05:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.magproductions.nl (magfour.magproductions.nl [87.249.97.162]) by postgresql.org (Postfix) with ESMTP id 253C89FB26A for ; Fri, 11 Aug 2006 10:05:01 -0300 (ADT) Received: from cc756500-a.ensch1.ov.home.nl ([82.75.196.246] helo=[172.27.1.6]) by mx1.magproductions.nl with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1GBWh9-0008RO-V4; Fri, 11 Aug 2006 15:05:00 +0200 Message-ID: <44DC8047.3040502@magproductions.nl> Date: Fri, 11 Aug 2006 15:04:07 +0200 From: Alban Hertroys User-Agent: Thunderbird 1.5.0.4 (X11/20060615) MIME-Version: 1.0 To: pedro.baldanta@gmail.com CC: pgsql-general@postgresql.org Subject: Re: Help. References: <1155300927.986088.186080@m79g2000cwm.googlegroups.com> In-Reply-To: <1155300927.986088.186080@m79g2000cwm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/512 X-Sequence-Number: 99284 pedro.baldanta@gmail.com wrote: > I'd like to truncate varchar field befor insert and update. > > Any example of trigger to perform this action? For something as simple as that a RULE using the trim(text) function should work well. If that's what you're looking for. -- Alban Hertroys alban@magproductions.nl magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede // Integrate Your World //