[postgis-users] DropGeometryColumn

strk strk at keybit.net
Thu Mar 18 19:30:48 PST 2004


On Thu, Mar 18, 2004 at 10:54:22AM -0800, David Blasby wrote:
> strk wrote:
> > I think it could be done applying a trigger from
> > AddGeometryColumn(). Unfortunately the trigger(s) will 
> > have to be hooked on system tables, which postgresql guys
> > does not like. You can nonetheless try that out and let 
> > us know.
> 
> strk,
> 
> DropGeometryColumn() should actually do an
> 
> ALTER TABLE <table> DROP COLUMN <column>;
> 
> The reason it doesnt is because postgresql 7.0 or 7.1 did NOT allow you 
> to do this.  Since at least 7.2, we've been able to - we just havent 
> updated the function.
> 
> Could you change it so it does the DROP column instead of the sillyness 
> it does now?

The ALTER TABLE .. DROP COLUMN support appears in
the PostgreSQL documentation only since version 7.3, see:
	http://www.postgresql.org/docs/7.2/static/sql-altertable.html
	http://www.postgresql.org/docs/7.3/static/sql-altertable.html

The SQL code should already be correct for PG>=73.
( since late december )

Please let me know if pgsql dox are broken/outdated.

> dave

--strk;



More information about the postgis-users mailing list