DropRasterConstraints — 移除參照網格表格欄位的 PostGIS 網格約束。如果您需要重新載入資料或更新網格欄位資料,此功能非常有用。
boolean DropRasterConstraints(
name rasttable, name rastcolumn, boolean srid, boolean scale_x, boolean scale_y, boolean blocksize_x, boolean blocksize_y, boolean same_alignment, boolean regular_blocking, boolean num_bands=true, boolean pixel_types=true, boolean nodata_values=true, boolean out_db=true , boolean extent=true)
;
boolean DropRasterConstraints(
name rastschema, name rasttable, name rastcolumn, boolean srid=true, boolean scale_x=true, boolean scale_y=true, boolean blocksize_x=true, boolean blocksize_y=true, boolean same_alignment=true, boolean regular_blocking=false, boolean num_bands=true, boolean pixel_types=true, boolean nodata_values=true, boolean out_db=true , boolean extent=true)
;
boolean DropRasterConstraints(
name rastschema, name rasttable, name rastcolumn, text[] constraints)
;
移除由 AddRasterConstraints 新增,且參照網格表格欄位的 PostGIS 網格約束。如果您需要載入更多資料或更新網格欄位資料,此功能非常有用。如果您想要移除網格表格或網格欄位,則不需要執行此操作。
若要移除網格表格,請使用標準的
DROP TABLE mytable
若只要移除網格欄位並保留表格的其餘部分,請使用標準 SQL
ALTER TABLE mytable DROP COLUMN rast
如果欄位或表格被移除,該表格將會從 raster_columns
目錄中消失。但是,如果僅移除約束,網格欄位仍將列在 raster_columns
目錄中,但除了欄位名稱和表格之外,將不會有其他相關資訊。
可用性:2.0.0
SELECT DropRasterConstraints ('myrasters','rast'); ----RESULT output --- t -- verify change in raster_columns -- SELECT srid, scale_x, scale_y, blocksize_x, blocksize_y, num_bands, pixel_types, nodata_values FROM raster_columns WHERE r_table_name = 'myrasters'; srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | pixel_types| nodata_values ------+---------+---------+-------------+-------------+-----------+-------------+--------------- 0 | | | | | | |