validating incoming string length...

From: Steve Holdoway <steve(at)firetrust(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: validating incoming string length...
Date: 2006-11-07 22:32:46
Message-ID: 20061108113246.f910a989.steve@firetrust.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andrew 2006-11-07 23:12:42 Direct Client Req from ProV-----Linux Admin/PostGre SQL DBA at San Diego, CA
Previous Message Tom Lane 2006-11-07 21:42:35 Re: pg_dump and foreign keys troubles