Re: Proper entry of polygon type data

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Proper entry of polygon type data
Дата
Msg-id b42b73150903250906q11714e2dyc3b3a8ea406786ef@mail.gmail.com
обсуждение исходный текст
Ответ на Proper entry of polygon type data  (Peter Willis <peterw@borstad.com>)
Список pgsql-general
On Mon, Mar 23, 2009 at 2:13 PM, Peter Willis <peterw@borstad.com> wrote:
> For example:
> I have a triangle with vertex corners A, B, C.
>
> One entry per vertex format suggests
>
> INSERT INTO my_table (my_polygon_column)
> VALUES ( ((Ax,Ay),(Bx,By),(Cx,Cy)) );
>
>
> One entry per edge format suggests
>
> INSERT INTO my_table (my_polygon_column)
> VALUES ( ((Ax,Ay),(Bx,By),(Bx,By),(Cx,Cy),(Cx,Cy),(Ax,Ay)) );
>
> Which entry format is the correct one?
>
> If per vertex format is the correct one, do I need to
> 'close' the path by entering the first vertex again at the end of the
> list?

the documentation
(http://www.postgresql.org/docs/8.3/interactive/datatype-geometric.html#AEN5582)
shows that you are inserting a sequence of vertexes.  Also, it is
stated that the polygon is closed, which implies that you don't need
to close it yourself.

merlin

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

Предыдущее
От: Peter Willis
Дата:
Сообщение: Re: Proper entry of polygon type data
Следующее
От: Mike Charnoky
Дата:
Сообщение: Re: intermittant performance problem