Re: Extract from date field

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Extract from date field
Дата
Msg-id BANLkTik5Xy52MTf8h5h0kx-fJwLw3utPxg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Extract from date field  (James David Smith <james.david.smith@gmail.com>)
Список pgsql-novice
On 18 June 2011 18:02, James David Smith <james.david.smith@gmail.com> wrote:
> Thanks Thom.
>
> What does the ' ::int  ' bit do at the end?

That casts the whole lot to an int value so that it can be assigned to
the column you're updating.  Otherwise you could end up with an error
message saying the types don't match.

So ::int is equivalent to cast(column as int).

Thom

В списке pgsql-novice по дате отправления:

Предыдущее
От: James David Smith
Дата:
Сообщение: Re: Extract from date field
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Extract from date field