]> granicus.if.org Git - postgis/commitdiff
changed "=NULL" to "is null" for postgresql 7.3 devel issues (as reported
authorDavid Blasby <dblasby@gmail.com>
Mon, 19 Aug 2002 16:14:35 +0000 (16:14 +0000)
committerDavid Blasby <dblasby@gmail.com>
Mon, 19 Aug 2002 16:14:35 +0000 (16:14 +0000)
by  Eric -  redmonde@purdue.edu)

git-svn-id: http://svn.osgeo.org/postgis/trunk@180 b70326c6-7e19-0410-871a-916f4a2858ee

postgis.sql.in

index 5df9bce23a6de68f60fe3c9b51251a330cc843e4..86b529759253d214b927e60cd4a036283d205776 100644 (file)
@@ -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 ''