#5091 closed enhancement (fixed)
Allow PostGIS table overwrite updates via truncate
Reported by: | mpfister | Owned by: | warmerdam |
---|---|---|---|
Priority: | low | Milestone: | 1.11.0 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
ogr2ogr updates a PostGIS table by first running a DROP CASCADE on the table, then recreating it. If there are views on the table, they are dropped by the CASCADE. Is it possible to update a table by instead running TRUNCATE on the table to empty it, then filling it with new records? I've tried combinations of the current options and don't think you can accomplish this result presently.
Change History (4)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Yes, I truncate with psql already, though that's a handy trick to use ogrinfo.
comment:3 by , 11 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | → 2.0 |
Resolution: | → fixed |
Status: | new → closed |
comment:4 by , 10 years ago
Milestone: | 2.0 → 1.11.0 |
---|
Note:
See TracTickets
for help on using tickets.
You can try: 'ogrinfo pg:dbname=XXXX -sql "truncate table foo"' before running ogr2ogr -append