DROP CAST

Synopsis

Use the DROP CAST statement to remove a cast.

Syntax

  1. drop_cast ::= DROP CAST [ IF EXISTS ] ( cast_signature )
  2. [ CASCADE | RESTRICT ]

drop_cast

DROP CAST - 图1

Semantics

See the semantics of each option in the [PostgreSQL docs][postgresql-docs-drop-cast].

Examples

Basic example.

  1. yugabyte=# CREATE FUNCTION sql_to_date(integer) RETURNS date AS $$
  2. SELECT $1::text::date
  3. $$ LANGUAGE SQL IMMUTABLE STRICT;
  4. yugabyte=# CREATE CAST (integer AS date) WITH FUNCTION sql_to_date(integer) AS ASSIGNMENT;
  5. yugabyte=# DROP CAST (integer AS date);

See also