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
)
;
删除引用由添加的栅格表列的PostGIS栅格约束 AddRasterConstraints 。在需要加载更多数据或更新栅格列数据时非常有用。如果要删除栅格表或栅格列,则不需要执行此操作。
要删除栅格表,请使用标准
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 | | | | | | |