From f96a7c346bd7c552533833e40861985d2fa61258 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 20 Jan 2004 20:14:17 +0000 Subject: [PATCH] cleaner comments for DropGeometryColumn git-svn-id: http://svn.osgeo.org/postgis/trunk@429 b70326c6-7e19-0410-871a-916f4a2858ee --- Attic/postgis_sql_73_end.sql.in | 24 +++++------------------- Attic/postgis_sql_74_end.sql.in | 23 +++++------------------ 2 files changed, 10 insertions(+), 37 deletions(-) diff --git a/Attic/postgis_sql_73_end.sql.in b/Attic/postgis_sql_73_end.sql.in index 95b825e56..959b22271 100644 --- a/Attic/postgis_sql_73_end.sql.in +++ b/Attic/postgis_sql_73_end.sql.in @@ -12,6 +12,9 @@ -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- $Log$ +-- Revision 1.9 2004/01/20 20:14:17 strk +-- cleaner comments for DropGeometryColumn +-- -- Revision 1.8 2003/12/30 10:40:21 strk -- For all versions: -- Updated fix_geometry_columns to use a more readable format in queries. @@ -378,26 +381,9 @@ END; -- - - - - - - - - - - - - - - - - - - - - - - - - - - - -- DROPGEOMETRYCOLUMN( , , ) -- --- There is no ALTER TABLE DROP COLUMN command in postgresql --- There is no ALTER TABLE DROP CONSTRAINT command in postgresql --- So, we: --- 1. remove the unwanted geom column reference from the --- geometry_columns table --- 2. update the table so that the geometry column is all NULLS --- This is okay since the CHECK srid(geometry) = is not --- checked if geometry is NULL (the isstrict attribute on srid()) --- 3. add another constraint that the geometry column must be NULL --- This, effectively kills the geometry column --- (a) its not in the geometry_column table --- (b) it only has nulls in it --- (c) you cannot add anything to the geom column because it must be NULL --- --- This will screw up if you put a NOT NULL constraint on the geometry --- column, so the first thing we must do is remove this constraint (its a --- modification of the pg_attribute system table) +-- Removes geometry column reference from geometry_columns table, +-- and actually drops the column. -- --- We also check to see if the table/column exists in the geometry_columns --- table CREATE FUNCTION DropGeometryColumn(varchar,varchar,varchar) RETURNS text AS diff --git a/Attic/postgis_sql_74_end.sql.in b/Attic/postgis_sql_74_end.sql.in index 6a8653652..21e94bec9 100644 --- a/Attic/postgis_sql_74_end.sql.in +++ b/Attic/postgis_sql_74_end.sql.in @@ -12,6 +12,9 @@ -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- $Log$ +-- Revision 1.9 2004/01/20 20:14:17 strk +-- cleaner comments for DropGeometryColumn +-- -- Revision 1.8 2004/01/20 20:10:39 strk -- removed bogus comment about missed alter table drop column -- @@ -415,25 +418,9 @@ END; -- - - - - - - - - - - - - - - - - - - - - - - - - - - - -- DROPGEOMETRYCOLUMN( ,
, ) -- --- There is no ALTER TABLE DROP CONSTRAINT command in postgresql --- So, we: --- 1. remove the unwanted geom column reference from the --- geometry_columns table --- 2. update the table so that the geometry column is all NULLS --- This is okay since the CHECK srid(geometry) = is not --- checked if geometry is NULL (the isstrict attribute on srid()) --- 3. add another constraint that the geometry column must be NULL --- This, effectively kills the geometry column --- (a) its not in the geometry_column table --- (b) it only has nulls in it --- (c) you cannot add anything to the geom column because it must be NULL --- --- This will screw up if you put a NOT NULL constraint on the geometry --- column, so the first thing we must do is remove this constraint (its a --- modification of the pg_attribute system table) +-- Removes geometry column reference from geometry_columns table, +-- and actually drops the column. -- --- We also check to see if the table/column exists in the geometry_columns --- table CREATE FUNCTION DropGeometryColumn(varchar,varchar,varchar) RETURNS text AS -- 2.50.1