[postgis-users] Is that possible a function to behave differently inside and outside another main function code?

Kevin Neufeld kneufeld at refractions.net
Thu Nov 12 12:41:17 PST 2009

rodrigosperb wrote:
> Well, I'm quite sure that the input have at least 2 points. Because they are
> "bigger" functions (implemented as LINESTRING) that I cut a part (and my
> RAISE NOTICEs during the code seem to indicate that this cutting performs
> correctly), so they will have at least 2-points, start and end of the X
> interval in which I cut the function to give as input.

Ah OK.  Is it possible your cutting would yield a vertical 2-point line?  Cuz such a line would have only 1 distinct X 
value, right?  That's what I meant by erroneous input data.  If I understand correctly, based on your query logic, a 
vertical line input into your function would result in a single POINT geometry which you try to turn into a LINESTRING.

-- Kevin

More information about the postgis-users mailing list