> Tom Lane wrote:
> >
> > Mark Stosberg <[EMAIL PROTECTED]> writes:
> > > * Install earthdistance operator from the contrib directory.
> > > * try this:
> > > cascade=> select null <@> '1,1'::point;
> >
> > > ## The result I get:
> > > pqReadData() -- backend closed the channel unexpectedly.
> >
> > Probably the earthdistance functions are not NULL-safe and need to be
> > marked "isStrict" in CREATE FUNCTION. Would you be willing to do the
> > legwork on working up a patch for that?
Tom,
Here's a patch using "isstrict":
############
--- earthdistance.sql.in.org Thu Aug 16 17:08:19 2001
+++ earthdistance.sql.in Thu Aug 16 17:09:01 2001
@@ -3,7 +3,8 @@
DROP FUNCTION geo_distance (point, point);
CREATE FUNCTION geo_distance (point, point) RETURNS float8
- AS 'MODULE_PATHNAME' LANGUAGE 'c';
+ AS 'MODULE_PATHNAME' LANGUAGE 'c'
+ WITH (isstrict);
SELECT geo_distance ('(1,2)'::point, '(3,4)'::point);
#############
Now when I run the "crasher" SQL above, I get one empty row back:
sumsault_test=# select null <@> '1,1'::point;
?column?
----------
(1 row)
#############
I look forward to seeing you at the Open Source Database Summit!
-mark
. . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
[EMAIL PROTECTED] Summersault, LLC
v: 765-939-9301 ext 223 website development
. . . . . http://www.summersault.com/ . . . . . . .
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster