Re: Trying to update a box data type column

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Trying to update a box data type column
Дата
Msg-id 16669.1148406041@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Trying to update a box data type column  (Yonatan Ben-Nes <yonatan@epoch.co.il>)
Список pgsql-general
Yonatan Ben-Nes <yonatan@epoch.co.il> writes:
> I can't figure out how I can update the box column using the values at
> the nleft & nright columns.

Use the provided constructor functions:

regression=# select box(point(1,2),point(3,4));
     box
-------------
 (3,4),(1,2)
(1 row)

As a general rule, converting something to text and back is not the way
to convert data from one type to another; if it's not a really
outlandish conversion, there'll be a function or cast to help.

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Trying to update a box data type column
Следующее
От: "Dawid Kuroczko"
Дата:
Сообщение: Re: background triggers?