From 7ed1f039e2bd68b8c44d078524e07ad5a81e4480 Mon Sep 17 00:00:00 2001 From: David Blasby Date: Mon, 19 Aug 2002 16:14:35 +0000 Subject: [PATCH] changed "=NULL" to "is null" for postgresql 7.3 devel issues (as reported by Eric - redmonde@purdue.edu) git-svn-id: http://svn.osgeo.org/postgis/trunk@180 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis.sql.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/postgis.sql.in b/postgis.sql.in index 5df9bce23..86b529759 100644 --- a/postgis.sql.in +++ b/postgis.sql.in @@ -28,7 +28,7 @@ create table spatial_ref_sys ( proj4text varchar(2048) ); --- create the metadata table. spec, section 3.2.2.1 +-- create the metadata table. spec, section 3.2.2.1 create table geometry_columns ( f_table_catalog varchar(256) not null, @@ -118,11 +118,11 @@ BEGIN -- update the given table/column so that it it all NULLS - EXECUTE ''update ''||table_name||'' set ''||column_name||''=NULL''; + EXECUTE ''update ''||table_name||'' set ''||column_name||'' IS NULL''; -- add = NULL constraint to given table/column - EXECUTE ''ALTER TABLE ''||table_name||'' ADD CHECK (''||column_name||'' = NULL)''; + EXECUTE ''ALTER TABLE ''||table_name||'' ADD CHECK (''||column_name||'' IS NULL)''; RETURN table_name || ''.'' || column_name ||'' effectively removed.''; @@ -199,7 +199,7 @@ BEGIN '') = '' || new_srid || '')'' ; IF (not(new_type = ''GEOMETRY'')) THEN - EXECUTE ''ALTER TABLE '' ||table_name||'' ADD CHECK ( geometrytype(''||column_name||'')=''|| quote_literal(new_type)||'' OR NULL=('' ||column_name ||''))''; + EXECUTE ''ALTER TABLE '' ||table_name||'' ADD CHECK ( geometrytype(''||column_name||'')=''|| quote_literal(new_type)||'' OR ('' ||column_name ||'') is null)''; END IF; return ''Geometry column '' || column_name || '' added to table '' -- 2.40.0