BUG #2240: length() with geometric types - Mailing list pgsql-bugs

From Andreas Erber
Subject BUG #2240: length() with geometric types
Date
Msg-id 20060206144139.B5F65F0AC7@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #2240: length() with geometric types
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2240
Logged by:          Andreas Erber
Email address:      post@andreas-erber.net
PostgreSQL version: 8.0.2
Operating system:   Windows XP
Description:        length() with geometric types
Details:

Hi,

I discovered some strange behaviour:
The length() function returns different results depending on the geometric
data type used as argument.

length(lseg) produces the correct result, i.e. length(lseg('(0,0),(2,0)')) =
2

length(path) always produces the double result (independently from the
length of the path), i.e.
length(path('(0,0),(2,0)')) = 4
length(path('(0,0),(2,0),(4,0),(6,0),(8,0)')) = 16

Is it supposed to be that way? If yes, why?

CU
ae

pgsql-bugs by date:

Previous
From: Márcio A. Sepp
Date:
Subject: Problems with createlang - windows
Next
From: "Matthew Bellew"
Date:
Subject: BUG #2242: Inconsistent casting in query with literal vs query with parameter