Re: Proper entry of polygon type data - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Proper entry of polygon type data
Date
Msg-id b42b73150903250906q11714e2dyc3b3a8ea406786ef@mail.gmail.com
Whole thread Raw
In response to Proper entry of polygon type data  (Peter Willis <peterw@borstad.com>)
List 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 by date:

Previous
From: Peter Willis
Date:
Subject: Re: Proper entry of polygon type data
Next
From: Mike Charnoky
Date:
Subject: Re: intermittant performance problem