pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alban Hertroys <alban@magproductions.nl>
To: pedro.baldanta@gmail.com
Cc: pgsql-general@postgresql.org
Subject: Re: Help.
Date: Fri, 11 Aug 2006 15:04:07 +0200
Message-ID: <44DC8047.3040502@magproductions.nl> (raw)
In-Reply-To: <1155300927.986088.186080@m79g2000cwm.googlegroups.com>
References: <1155300927.986088.186080@m79g2000cwm.googlegroups.com>

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 //



view thread (69+ messages)  latest in thread

Message-ID: <44DC8047.3040502@magproductions.nl>
Permalink:  ../44DC8047.3040502@magproductions.nl/
Also on:    postgresql.org/message-id/44DC8047.3040502@magproductions.nl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: alban@magproductions.nl, pedro.baldanta@gmail.com
  Subject: Re: Help.
  In-Reply-To: <44DC8047.3040502@magproductions.nl>
  References: <1155300927.986088.186080@m79g2000cwm.googlegroups.com> <44DC8047.3040502@magproductions.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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