<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [postgis-devel] Prepared Geometry API</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=2>I guess there is no way to know when we are dealing with a constant e.g. by the look of the pointer or DATUM?  Then at least we know the information is no good and we resort to the old way.  I think if we can do that, it will probably take care of most use-cases anyway and the others will just be as they were.<BR>
<BR>
R<BR>
<BR>
-----Original Message-----<BR>
From: postgis-devel-bounces@postgis.refractions.net on behalf of Paul Ramsey<BR>
Sent: Mon 10/6/2008 2:59 PM<BR>
To: PostGIS Development Discussion<BR>
Subject: Re: [postgis-devel] Prepared Geometry API<BR>
<BR>
Exactly as one would expect: sometimes :)<BR>
<BR>
P<BR>
<BR>
On Mon, Oct 6, 2008 at 11:52 AM, Obe, Regina <robe.dnd@cityofboston.gov> wrote:<BR>
> What about using the PG_GETARG_POINTER does that return the same for all<BR>
> constants too?<BR>
><BR>
> -----Original Message-----<BR>
> From: postgis-devel-bounces@postgis.refractions.net<BR>
> [<A HREF="mailto:postgis-devel-bounces@postgis.refractions.net">mailto:postgis-devel-bounces@postgis.refractions.net</A>] On Behalf Of Paul<BR>
> Ramsey<BR>
> Sent: Monday, October 06, 2008 2:48 PM<BR>
> To: PostGIS Development Discussion<BR>
> Subject: Re: [postgis-devel] Prepared Geometry API<BR>
><BR>
> The answer seems to be that, for data in tables, this works OK, but<BR>
> for literals, it's possible for different literals to get the same<BR>
> datum number:<BR>
><BR>
> select a.val as a, b.val as b, st_contains(a.val, b.val, 0) from<BR>
> (select 'POINT(0 0)' as val union select 'POINT(1 1)' as val) a,<BR>
> (select 'POINT(0 0)' as val union select 'POINT(1 1)' as val) b;<BR>
><BR>
> This ends up returning the same datum number for 0,0 as well as 1,1. :(<BR>
><BR>
> P.<BR>
><BR>
> On Mon, Oct 6, 2008 at 11:23 AM, Paul Ramsey <pramsey@cleverelephant.ca><BR>
> wrote:<BR>
>> Why can't I just this this:<BR>
>><BR>
>> key1 = PG_GETARG_DATUM(0)<BR>
>> key2 = PG_GETARG_DATUM(1)<BR>
>><BR>
>> the datums are just uint, and they don't get turned into pointers<BR>
>> until further down the line... I just tried changing my contains code<BR>
>> to do this, and I got the same answer in the same amount of time.  Are<BR>
>> the datum numbers reliable "object identifiers"?<BR>
>><BR>
>> P.<BR>
>><BR>
>> On Mon, Oct 6, 2008 at 10:53 AM, David Fuhry <dfuhry@acm.org> wrote:<BR>
>>> ctid will work for that, but I believe it would have to be passed<BR>
> into the<BR>
>>> function as a separate argument from the geometry, so API ugliness<BR>
> remains.<BR>
>><BR>
> _______________________________________________<BR>
> postgis-devel mailing list<BR>
> postgis-devel@postgis.refractions.net<BR>
> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
> -----------------------------------------<BR>
> The substance of this message, including any attachments, may be<BR>
> confidential, legally privileged and/or exempt from disclosure<BR>
> pursuant to Massachusetts law. It is intended<BR>
> solely for the addressee. If you received this in error, please<BR>
> contact the sender and delete the material from any computer.<BR>
> _______________________________________________<BR>
> postgis-devel mailing list<BR>
> postgis-devel@postgis.refractions.net<BR>
> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
><BR>
_______________________________________________<BR>
postgis-devel mailing list<BR>
postgis-devel@postgis.refractions.net<BR>
<A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>