[postgis-users] Bug in astext?
Luis Mota
luis.mota at iscte.pt
Tue Dec 10 16:32:21 PST 2002
Hi everyone.
I think there is a bug in astext... Is that possible?
I've been writing some functions in plpgsql and if I try to do sth like
returnText := ''''''''||astext(transform(geomfromtext(''''''POINT(''||
longitude||'' ''||
latitude||'')'''''',gcsID),
20790))||'''''''';
I get an unterminated string...
On the other hand, if I do it like this:
returnText := astext(transform(geomfromtext(''''''POINT(''||
longitude||'' ''||
latitude||'')'''''',gcsID),
20790));
returnText := ''''''''||
substring(returnText FROM 1 FOR length(returnText)-1)
||'''''''';
(ie, I pop the last character in the string) everything works fine.
(in these examples, latitude and longitude are floats and pcsID is an int)
As far as I can guess, there is a last character in the return from
astext() that doesn't let the string end...
Has anyone experienced this?
I'm working with:
postgis_version 0.7
and
version PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
Bye, Luís
More information about the postgis-users
mailing list