Sha256: 12197fa39dc2b3b12ea05df919fe8b33fb4e7f4f6ffb3fe36bd0b237eea7e1f8

Contents?: true

Size: 331 Bytes

Versions: 3

Compression:

Stored size: 331 Bytes

Contents

CREATE FUNCTION hex_to_int(varchar) RETURNS int4 AS '
  DECLARE
    h alias for $1;
    exec varchar;
    curs refcursor;
    res int;
  BEGIN
    exec := ''SELECT x'''''' || h || ''''''::int4'';
    OPEN curs FOR EXECUTE exec;
    FETCH curs INTO res;
    CLOSE curs;
    return res;
  END;'
LANGUAGE 'plpgsql' IMMUTABLE STRICT;

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
pager-ultrasphinx-1.0.20080510 lib/ultrasphinx/postgresql/hex_to_int.sql
pager-ultrasphinx-1.0.20080514 lib/ultrasphinx/postgresql/hex_to_int.sql
ultrasphinx-1.11 lib/ultrasphinx/postgresql/hex_to_int.sql