[postgis] Unable to drop contraint
John Reid
jgreid at uow.edu.au
Sun Mar 3 03:55:58 PST 2002
Hi,
Not to be tried on a production database. Won't be a problem in the
long term anyway - according to the docs ALTER TABLE can drop check
constraints in 7.2.
Dave Blasby wrote:
>John Reid wrote:
>
>>Another alternative is to directly manipulate the postgres system
>>catalogues (danger Will Robinson!!!!). You will need at least usesuper
>>
>
>Pull Up!! Pull Up!!
>
>Its usually a really bad thing to directly modify the system catalogs.
>
>You should really just DropGeometryColumn(), then drop the table and
>start from scratch.
>
>Alternatively, here's another method that should work for you:
>
>1. Make a copy of your table (this will have no contraints on it):
> create table tmp_table as select * from <table>;
>2. DropGeometryColumn() on your old table to de-register the geometry in
>the geometry_columns table
>3. drop the old table
>4. create the table again
>5. AddGeometryColumn() to create & register the geometry column. Make
>sure you set the parameters correctly.
>6. If you're changing SRIDs you'll have to:
> update table tmp_table set <geometry column> = setSRID(<geometry
>column>,<srid>)
>7. use "select into..." to put the rows in tmp_table into the new table
>
>dave
>
>------------------------ Yahoo!
>
>To unsubscribe from this group, send an email to:
>postgis-unsubscribe at yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
--
----------------------------------------------------------------------
john reid e-mail jgreid at uow.edu.au
uproot your questions from their ground and the dangling roots will be
seen. more questions!
-mentat zensufi
apply standard disclaimers as desired...
----------------------------------------------------------------------
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Tiny Wireless Camera under $80!
Order Now! FREE VCR Commander!
Click Here - Only 1 Day Left!
http://us.click.yahoo.com/nuyOHD/7.PDAA/yigFAA/PhFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the postgis-users
mailing list