DROP CAST
Synopsis
Use the DROP CAST
statement to remove a cast.
Syntax
drop_cast ::= DROP CAST [ IF EXISTS ] ( cast_signature )
[ CASCADE | RESTRICT ]
drop_cast
Semantics
See the semantics of each option in the [PostgreSQL docs][postgresql-docs-drop-cast].
Examples
Basic example.
yugabyte=# CREATE FUNCTION sql_to_date(integer) RETURNS date AS $$
SELECT $1::text::date
$$ LANGUAGE SQL IMMUTABLE STRICT;
yugabyte=# CREATE CAST (integer AS date) WITH FUNCTION sql_to_date(integer) AS ASSIGNMENT;
yugabyte=# DROP CAST (integer AS date);
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .