Welcome to Knowledge Base!

KB at your finger tips

This is one stop global knowledge base where you can learn about all the products, solutions and support features.

Categories
All

Database-PostgreSQL

DROP CAST

DROP CAST

DROP CAST — remove a cast

Synopsis

DROP CAST [ IF EXISTS ] (source_type AS target_type) [ CASCADE | RESTRICT ]

Description

DROP CAST removes a previously defined cast.

To be able to drop a cast, you must own the source or the target data type. These are the same privileges that are required to create a cast.

Parameters

IF EXISTS

Do not throw an error if the cast does not exist. A notice is issued in this case.

source_type

The name of the source data type of the cast.

target_type

The name of the target data type of the cast.

CASCADE
RESTRICT

These key words do not have any effect, since there are no dependencies on casts.

Examples

To drop the cast from type text to type int :

DROP CAST (text AS int);

Compatibility

The DROP CAST command conforms to the SQL standard.

See Also

CREATE CAST

54.32. pg_timezone_names

54.32. pg_timezone_names

The view pg_timezone_names provides a list of time zone names that are recognized by SET TIMEZONE , along with their associated abbreviations, UTC offsets, and daylight-savings status. (Technically, PostgreSQL does not use UTC because leap seconds are not handled.) Unlike the abbreviations shown in pg_timezone_abbrevs , many of these names imply a set of daylight-savings transition date rules. Therefore, the associated information changes across local DST boundaries. The displayed information is computed based on the current value of CURRENT_TIMESTAMP .

Table 54.32. pg_timezone_names Columns

Column Type

Description

name text

Time zone name

abbrev text

Time zone abbreviation

utc_offset interval

Offset from UTC (positive means east of Greenwich)

is_dst bool

True if currently observing daylight savings


Read article

54.32. pg_timezone_names

54.32. pg_timezone_names

The view pg_timezone_names provides a list of time zone names that are recognized by SET TIMEZONE , along with their associated abbreviations, UTC offsets, and daylight-savings status. (Technically, PostgreSQL does not use UTC because leap seconds are not handled.) Unlike the abbreviations shown in pg_timezone_abbrevs , many of these names imply a set of daylight-savings transition date rules. Therefore, the associated information changes across local DST boundaries. The displayed information is computed based on the current value of CURRENT_TIMESTAMP .

Table 54.32. pg_timezone_names Columns

Column Type

Description

name text

Time zone name

abbrev text

Time zone abbreviation

utc_offset interval

Offset from UTC (positive means east of Greenwich)

is_dst bool

True if currently observing daylight savings


Read article

37.48. sql_features

37.48. sql_features

The table sql_features contains information about which formal features defined in the SQL standard are supported by PostgreSQL . This is the same information that is presented in Appendix D. There you can also find some additional background information.

Table 37.46. sql_features Columns

Column Type

Description

feature_id character_data

Identifier string of the feature

feature_name character_data

Descriptive name of the feature

sub_feature_id character_data

Identifier string of the subfeature, or a zero-length string if not a subfeature

sub_feature_name character_data

Descriptive name of the subfeature, or a zero-length string if not a subfeature

is_supported yes_or_no

YES if the feature is fully supported by the current version of PostgreSQL , NO if not

is_verified_by character_data

Always null, since the PostgreSQL development group does not perform formal testing of feature conformance

comments character_data

Possibly a comment about the supported status of the feature


Read article

37.48. sql_features

37.48. sql_features

The table sql_features contains information about which formal features defined in the SQL standard are supported by PostgreSQL . This is the same information that is presented in Appendix D. There you can also find some additional background information.

Table 37.46. sql_features Columns

Column Type

Description

feature_id character_data

Identifier string of the feature

feature_name character_data

Descriptive name of the feature

sub_feature_id character_data

Identifier string of the subfeature, or a zero-length string if not a subfeature

sub_feature_name character_data

Descriptive name of the subfeature, or a zero-length string if not a subfeature

is_supported yes_or_no

YES if the feature is fully supported by the current version of PostgreSQL , NO if not

is_verified_by character_data

Always null, since the PostgreSQL development group does not perform formal testing of feature conformance

comments character_data

Possibly a comment about the supported status of the feature


Read article

Chapter 11. Indexes

Chapter 11. Indexes

Table of Contents

11.1. Introduction
11.2. Index Types
11.2.1. B-Tree
11.2.2. Hash
11.2.3. GiST
11.2.4. SP-GiST
11.2.5. GIN
11.2.6. BRIN
11.3. Multicolumn Indexes
11.4. Indexes and ORDER BY
11.5. Combining Multiple Indexes
11.6. Unique Indexes
11.7. Indexes on Expressions
11.8. Partial Indexes
11.9. Index-Only Scans and Covering Indexes
11.10. Operator Classes and Operator Families
11.11. Indexes and Collations
11.12. Examining Index Usage

Indexes are a common way to enhance database performance. An index allows the database server to find and retrieve specific rows much faster than it could do without an index. But indexes also add overhead to the database system as a whole, so they should be used sensibly.

Read article