BUG #2240: length() with geometric types

From: "Andreas Erber" <post(at)andreas-erber(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2240: length() with geometric types
Date: 2006-02-06 14:41:39
Message-ID: 20060206144139.B5F65F0AC7@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2240
Logged by: Andreas Erber
Email address: post(at)andreas-erber(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Olleg Samoylov 2006-02-06 14:58:50 BUG #2241: "vacuumdb -a" remove freeze
Previous Message Peter van der Maas 2006-02-06 12:32:33 Re: BUG #2182: Internal account lookup failure: