Re: How do I create a box from fields in a table?

Поиск
Список
Период
Сортировка
Искать
От
D'Arcy J.M. Cain
Тема
Re: How do I create a box from fields in a table?
Дата
Msg-id
20131018112533.38b58077@imp
Ответ на
Список
Дерево обсуждения
How do I create a box from fields in a table? Rob Richardson <RDRichardson@rad-con.com>
Re: How do I create a box from fields in a table? Merlin Moncure <mmoncure@gmail.com>
Re: How do I create a box from fields in a table? Rob Richardson <RDRichardson@rad-con.com>
Re: How do I create a box from fields in a table? Tom Lane <tgl@sss.pgh.pa.us>
Re: How do I create a box from fields in a table? "D'Arcy J.M. Cain" <darcy@druid.net>
Re: How do I create a box from fields in a table? Tom Lane <tgl@sss.pgh.pa.us>
Re: How do I create a box from fields in a table? Merlin Moncure <mmoncure@gmail.com>
On Fri, 18 Oct 2013 17:05:07 +0200
Tom Lane  wrote:
> For some reason, there's no constructor function to make a box from
> four floats.  But there is a box constructor that takes two points,
> as well as a point constructor that takes two floats; so you could do
> something like
> 
> 	box(point(location, 1), point(2, 3))

Kind of makes sense anyway.  The only improvement I would make is to
allow a shortcut like this;

    box((0, 1), (2, 3))

In fact, casting an array of two floats in a point context to a point
would be a good idea anyway.  In fact, this seems to work already if
quotes are added:

    box('(0, 1), (2, 3)')

-- 
D'Arcy J.M. Cain          |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 788 2246     (DoD#0082)    (eNTP)   |  what's for dinner.
IM: darcy@Vex.Net, VoIP: sip:darcy@druid.net

В списке pgsql-general по дате отправления
От: Adrian Klaver
Дата:
От: Tom Lane
Дата:
FAQ