Re: Error size varchar - Mailing list pgsql-general

From Edwin Quijada
Subject Re: Error size varchar
Date
Msg-id BAY1-F898AWiZAtGYkN0001367f@hotmail.com
Whole thread Raw
In response to Error size varchar  ("Edwin Quijada" <listas_quijada@hotmail.com>)
Responses Re: Error size varchar  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Error size varchar  (Adam Kavan <akavan@cox.net>)
List pgsql-general
wHAT IS unconstrained varchar???



*-------------------------------------------------------*
*-Edwin Quijada
*-Developer DataBase
*-JQ Microsistemas
*-809-747-2787
* " Si deseas lograr cosas excepcionales debes de hacer cosas fuera de lo
comun"
*-------------------------------------------------------*





>From: Tom Lane <tgl@sss.pgh.pa.us>
>To: "Edwin Quijada" <listas_quijada@hotmail.com>
>CC: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] Error size varchar Date: Wed, 29 Oct 2003 11:28:23
>-0500
>
>"Edwin Quijada" <listas_quijada@hotmail.com> writes:
> > I got error about a length field varchar. I have a table with a field
>type
> > varchar(20) but if I try to set to this field more than 20 characters I
>got
> > error.
> > I did a function to control the length of data and put it on trigger but
> > when it ocurrs I got the error anyway and the trigger not works.
>
>The length constraint is checked before triggers are fired, I believe.
>If you want silent truncation rather than an error, use a text column
>(or unconstrained varchar) and put the truncation behavior into your
>trigger.
>
>            regards, tom lane

_________________________________________________________________
Fretting that your Hotmail account may expire because you forgot to sign in
enough? Get Hotmail Extra Storage today!
http://join.msn.com/?PAGE=features/es


pgsql-general by date:

Previous
From: "Lada 'Ray' Lostak"
Date:
Subject: Re: Performace question
Next
From: Tom Lane
Date:
Subject: Re: Performace question