Sha256: ce63c053e9409e79f4dfb109c3059da703ca093bcd1cdfda4a25e32b71c8b387

Contents?: true

Size: 318 Bytes

Versions: 2

Compression:

Stored size: 318 Bytes

Contents

/* Taken from ultrasphinx */

/* Fake CRC32 */

CREATE FUNCTION crc32(text)
RETURNS bigint AS $$
  DECLARE
    tmp bigint;
  BEGIN
    tmp = (hex_to_int(SUBSTRING(MD5($1) FROM 1 FOR 8))::bigint);
    IF tmp < 0 THEN
      tmp = 4294967296 + tmp;
    END IF;
    return tmp;
  END
$$ IMMUTABLE STRICT LANGUAGE plpgsql;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
minisphinx-1.0.1 lib/mysqlcompat/crc32.sql
minisphinx-1.0.0 lib/mysqlcompat/crc32.sql