Re: Automatic truncation of character values & casting to the type of a column type
От
Sam Mason
Тема
Re: Automatic truncation of character values & casting to the type of a column type
Дата
Msg-id
20091217153125.GT5407@samason.me.uk
Ответ на
Список
Дерево обсуждения
Automatic truncation of character values & casting to the type of a
column type Justin Bailey <jgbailey@gmail.com>
Re: Automatic truncation of character values & casting to the type of a column type Tom Lane <tgl@sss.pgh.pa.us>
Re: Automatic truncation of character values & casting to
the type of a column type Justin Bailey <jgbailey@gmail.com>
Re: Automatic truncation of character values & casting to the type of a column type Tom Lane <tgl@sss.pgh.pa.us>
Re: Automatic truncation of character values & casting to the type of a column type Sam Mason <sam@samason.me.uk>
Automatic truncation of character values & casting to the type of a
column type Justin Bailey <jgbailey@gmail.com>
Re: Automatic truncation of character values & casting to the type of a column type Adrian Klaver <aklaver@comcast.net>
On Thu, Dec 17, 2009 at 10:24:28AM -0500, Tom Lane wrote: > Justin Bailey writes: > > 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? I think the OP wants to be able to use the "%TYPE" magic in more places than the grammar currently accepts. For example, so that you can use it in a CAST expression as per some of the examples. Would using DOMAINs be a better alternative? It certainly works now. -- Sam http://samason.me.uk/
В списке pgsql-general по дате отправления
От: Adrian Klaver
Дата: