Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


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)')) =

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?



pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group