Sha256: d7c343f8668d5fb272335b89c9ff9ef4ace8d99cdffc2120b52a08bf7fea2467

Contents?: true

Size: 342 Bytes

Versions: 6

Compression:

Stored size: 342 Bytes

Contents

CREATE OR REPLACE 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

6 entries across 6 versions & 1 rubygems

Version Path
ultrasphinx-1.5.3 lib/ultrasphinx/hex_to_int.sql
ultrasphinx-1.6.7 lib/ultrasphinx/postgresql/hex_to_int.sql
ultrasphinx-1.7 lib/ultrasphinx/postgresql/hex_to_int.sql
ultrasphinx-1.8 lib/ultrasphinx/postgresql/hex_to_int.sql
ultrasphinx-1.6 lib/ultrasphinx/hex_to_int.sql
ultrasphinx-1.9 lib/ultrasphinx/postgresql/hex_to_int.sql