Re: Why does this not work? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why does this not work?
Date
Msg-id 10485.1018550706@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why does this not work?  ("Johann Zuschlag" <zuschlag@online.de>)
Responses Re: Why does this not work? (finally)  ("Johann Zuschlag" <zuschlag@online.de>)
List pgsql-general
"Johann Zuschlag" <zuschlag@online.de> writes:
>> The value is being coerced into the type before your trigger
>> runs to be put into the values you're testing and it fails
>> at that point.

> Is there a solution for such a problem?

Don't use varchar(n) --- use text.  You can still enforce the length
limit you want inside the trigger, if you really want a length limit
at all.

            regards, tom lane

pgsql-general by date:

Previous
From: "Marin Dimitrov"
Date:
Subject: Re: Why does this not work?
Next
From: Fran Fabrizio
Date:
Subject: Re: where to find info about data types?