Re: CRC function? - Mailing list pgsql-general

From Bruce Momjian
Subject Re: CRC function?
Date
Msg-id 200207080432.g684WNn14343@candle.pha.pa.us
Whole thread Raw
In response to CRC function?  (Francisco Reyes <lists@natserv.com>)
Responses Re: CRC function?  (Francisco Reyes <lists@natserv.com>)
List pgsql-general
Francisco Reyes wrote:
> Looked at contrib and didn't see it.
> Anyone knows if there is a CRC fuction available for PostgreSQL.
>
> As an example of how I would use it.
> Imagine a table with 3 columns
> id,text, crc_val
>
> I could then do something like:
> select id from <table> where crc(text) <> crc_val;

Sure see contrib/pgcrypto/README:

    Hashes:     MD5, SHA1, CRC32, CRC32B, GOST, TIGER, RIPEMD160,
                           ^^^^^^^^^^^^^

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



pgsql-general by date:

Previous
From: Francisco Reyes
Date:
Subject: CRC function?
Next
From: Alvaro Herrera
Date:
Subject: Re: Efficient use of space in large table?