Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

CRC32 Function

CRC32 is an error-detecting function that uses a CRC32 algorithm to detect changes between source and target data. The CRC32 function converts a variable-length string into an 8-character string that is a text representation of the hexadecimal value of a 32 bit-binary sequence.

Syntax

Copy
CRC32(string)

Arguments

string

A variable-length string.

Return Type

The CRC32 function returns an 8-character string that is a text representation of the hexadecimal value of a 32-bit binary sequence. The Amazon Redshift CRC32 function is based on the CRC-32C polynomial.

Example

The following example shows the 32-bit value for the string 'Amazon Redshift':

Copy
select crc32('Amazon Redshift'); crc32 ---------------------------------- f2726906 (1 row)