From 67a4b78881df6db9b30ca0278e788148d53f652d Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Sat, 2 Feb 2013 22:12:28 +0000 Subject: [PATCH] fix for 9.3 -- pg 9.3 seems to throw errors sooner so we need to check a topology exists before trying to query it. git-svn-id: http://svn.osgeo.org/postgis/trunk@11075 b70326c6-7e19-0410-871a-916f4a2858ee --- topology/sql/sqlmm.sql.in.c | 11 +++++++++-- topology/test/regress/st_addisonode_expected | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/topology/sql/sqlmm.sql.in.c b/topology/sql/sqlmm.sql.in.c index 4451dc030..67a0dced2 100644 --- a/topology/sql/sqlmm.sql.in.c +++ b/topology/sql/sqlmm.sql.in.c @@ -1,9 +1,9 @@ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -- PostGIS - Spatial Types for PostgreSQL --- http://postgis.refractions.net +-- http://postgis.net -- --- Copyright (C) 2010, 2011, 2012 Sandro Santilli +-- Copyright (C) 2010, 2011, 2012, 2013 Sandro Santilli -- Copyright (C) 2005 Refractions Research Inc. -- -- This is free software; you can redistribute and/or modify it under @@ -1464,6 +1464,13 @@ BEGIN 'SQL/MM Spatial exception - null argument'; END IF; + -- + -- Atopology must be registered + -- + IF NOT EXISTS(SELECT name FROM topology WHERE topology.name = atopology) THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - invalid topology name'; + END IF; -- -- Apoint must be a point -- diff --git a/topology/test/regress/st_addisonode_expected b/topology/test/regress/st_addisonode_expected index 15fcaecf3..0e99d6e98 100644 --- a/topology/test/regress/st_addisonode_expected +++ b/topology/test/regress/st_addisonode_expected @@ -9,7 +9,7 @@ ERROR: SQL/MM Spatial exception - null argument ERROR: SQL/MM Spatial exception - null argument ERROR: SQL/MM Spatial exception - null argument ERROR: SQL/MM Spatial exception - invalid topology name -ERROR: zero-length delimited identifier at or near """" at character 21 +ERROR: SQL/MM Spatial exception - invalid topology name ERROR: SQL/MM Spatial exception - not within face ERROR: SQL/MM Spatial exception - not within face ERROR: SQL/MM Spatial exception - not within face -- 2.50.1