Search Postgresql Archives

Re: Proper entry of polygon type data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 23, 2009 at 2:13 PM, Peter Willis <peterw@xxxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux