[HACKERS] Path and Polygon types - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject [HACKERS] Path and Polygon types
Date
Msg-id 371dcda52055b0e04e64d4f2691bcdd0
Whole thread Raw
List pgsql-hackers
I updated the code tree and regression tests to use the new syntax for
path and polygon geometric types. This will require a table update when
upgrading from pre-v6.1 databases, but I think this is preferable to
having two syntax styles lurking in the interpreter. From a previous
message to Hal Snyder:

>... One problem with retaining the ability to read the old notation is
>that, for path and polygon, the interpretation of the input varies
>wildly depending on how many parens you include in your string. For
>example,
>
>(for paths)
>'1,2,3,4,5,6' is interpreted as '((1,2),(3,4),(5,6))'
>'(1,2,3,4,5,6)' is interpreted as '((3,4),(5,6))'
>'((1,2),(3,4),(5,6))' is interpreted as in the first case
>
>(for polygons)
>'1,2,3,4' is interpreted as '((1,2),(3,4))'
>'(1,2,3,4)' is interpreted as '((1,3),(2,4))'
>'((1,2),(3,4))' is interpreted as in the first case

The "new syntax" gives a consistant interpretation to all of the above
input variations.

Hal was the only one who responded to my query a couple of weeks ago
regarding this topic, and he concurred on the change (at least on second
thought :)

I think the downside of having to update a few existing databases (not
everyone uses the geometric types) is far outweighed by not having
syntax variations to cope with in the future.

I don't expect these changes to cause big troubles, and I will make sure
that any unanticipated problems are fixed immediately.

I had wanted to put this in earlier, but did not have the time.

            - Tom

"idle hands are the devil's playground"...

------------------------------

pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: [HACKERS] 6.1 issues resolved
Next
From: Bruce Momjian
Date:
Subject: [HACKERS] [COMMITTERS] 'postgres95/src/backend/tcop variable.c' (fwd)