[postgis-users] box2d return from function!
robe.dnd at cityofboston.gov
Fri Jun 27 05:07:40 PDT 2008
Okay I'm confused. I tried this and it worked fine in both 8.2 1.3.3
and 8.3 1.3.3
CREATE OR REPLACE FUNCTION fntestbox2d(ageom geometry)
RETURNS box2d AS
DECLARE retobj box2d;
retobj := ST_Extent(ageom);
LANGUAGE 'plpgsql' IMMUTABLE
What are you trying to do? the cast from box to box2d as Mark noted is
a limitation of some sort.
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Mark
Sent: Friday, June 27, 2008 4:46 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] box2d return from function!
Dan Erikson wrote:
> Quick question here.....might be easy for someone who has done this:
> I want to return an extent (box2d) from a plpgsql function. I can
> define "box2d" as a type within the function, but only "box" in the
> function return type or the out variable type. Apparently I can't
> from "box2d" to "box" either.
> It is possible I am approaching this all wrong. Is there an easier
> to return the results of an extent query?
> (Postgresql 8.2)
> Dan Erikson BNRSc
> Project Manager
Yeah, I spotted this a while back :( Unfortunately changing it in the
1.3.x series will probably break a lot of applications, so the earliest
it will happen is somewhere in 1.4.
Sirius Corporation - The Open Source Experts
T: +44 870 608 0063
postgis-users mailing list
postgis-users at postgis.refractions.net
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
More information about the postgis-users