pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Holdoway <steve@firetrust.com>
To: pgsql-admin@postgresql.org
Subject: validating incoming string length...
Date: Wed, 8 Nov 2006 11:32:46 +1300
Message-ID: <20061108113246.f910a989.steve@firetrust.org> (raw)

I'm trying to write a pl/pgsql trigger to validate incoming data to an existing database. One of the fields is defined as character varying (255). Is there any way of catching over-length data on inserts and silently dropping them? At the moment, I'm getting the error 'ERROR:  value too long for type character varying(255)' no matter what I try.

And yes, I inherited this!

Cheers,

Steve



view thread (2+ messages)  latest in thread

Message-ID: <20061108113246.f910a989.steve@firetrust.org>
Permalink:  ../20061108113246.f910a989.steve@firetrust.org/
Also on:    postgresql.org/message-id/20061108113246.f910a989.steve@firetrust.org

 · 

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-admin@postgresql.org
  Cc: steve@firetrust.com
  Subject: Re: validating incoming string length...
  In-Reply-To: <20061108113246.f910a989.steve@firetrust.org>
  References: <20061108113246.f910a989.steve@firetrust.org>

* 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