Re: Automatic truncation of character values & casting to the type of a column type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Justin Bailey <jgbailey(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Automatic truncation of character values & casting to the type of a column type
Date: 2009-12-17 15:24:28
Message-ID: 1935.1261063468@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Justin Bailey <jgbailey(at)gmail(dot)com> writes:
> On Wed, Dec 16, 2009 at 7:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Really? Works for me, in everything back to 7.3.

> If s was automatically truncated, the insert would succeed, but it
> fails with a "value too long" error.

Oh, I thought the failure was the behavior you wanted. There's
no automatic truncation here --- perhaps putting an exception
block around it would be the way to go?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dimitri Fontaine 2009-12-17 15:28:23 Re: Table Partitioning Advice Request
Previous Message Justin Bailey 2009-12-17 15:15:58 Re: Automatic truncation of character values & casting to the type of a column type