[postgis-devel] Use ofdeprecated functionsin non-deprecatedfunctions

Obe, Regina robe.dnd at cityofboston.gov
Tue Jul 29 10:41:14 PDT 2008


Kevin,

I still have reservations.

It gets a bit iffy
later on down the line if we start deprecating auto-magic stuff I
guess was part of my thinking.  I was also thinking someone coming along
may not realize the distinction between using an sql function and a plpgsql 
function and arbitrarily copy the wrong approach thus accidentally slowing down performance.

Now I think about it, those things would be easy to catch anyway.

Although if we put a notice in there wouldn't it always be spitting out the NOTICE for each call which could potentially slow down older applications.

Take the example of 

SELECT Area(the_geom)
FROM sometable

Wouldn't it spit out a notice for each call which could slow things down a lot or maybe it doesn't work as I expect. In which case would be fine with me.  

Thanks,
Regina

-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net on behalf of Kevin Neufeld
Sent: Tue 7/29/2008 12:08 PM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] Use ofdeprecated	functionsin	non-deprecatedfunctions
 
Yes, I totally agree.  Sorry I wasn't clear.  I meant that if we ever 
were to start throwing NOTICEs on deprecated functions, I would think 
the way to do that would be to change the deprecated functions that 
reference the c directly into plpgsql functions.

IE.
"crosses" and "_crosses" both reference the c library directly.  Since 
we can't throw a NOTICE in the c function (since it would look like 
"_crosses" is also deprecated) we would need to change "crosses" to an 
aliased plpgsql function that first throws a NOTICE and then calls 
"_crosses".

I realize now that this topic is a little different than what you 
brought up a couple of posts ago.

Cheers,
Kevin


Obe, Regina wrote:
> You wouldn't want to do that.  plpgsql is opaque to the planner.  For
> things such as ST_Intersects, ST_DWithin, ST_Within and all those
> automagically indexed functions, they will become automagically stupid.
> 
> Regina
> 
> -----Original Message-----
> From: postgis-devel-bounces at postgis.refractions.net
> [mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of
> Kevin Neufeld
> Sent: Monday, July 28, 2008 1:16 PM
> To: PostGIS Development Discussion
> Subject: Re: [postgis-devel] Use of deprecated functionsin
> non-deprecatedfunctions
> 
> Obe, Regina wrote:
>> ... just wanted to verify there was no issue with referencing the
> lwpostgis c functions directly in all the aliased functions.  
>> Thanks,
>> Regina
>>
> 
> Are we planning some time in the future to start throwing NOTICEs / 
> ERRORs on deprecated function use?  If so, I would think the easiest way
> 
> to do this would be through the simple wrappers we have now (though 
> we'll have to convert the SQL wrappers to plpgsql wrappers).
> 
> Cheers,
> -- Kevin
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
> -----------------------------------------
> 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.
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20080729/cbd71299/attachment.html>


More information about the postgis-devel mailing list