Created
November 10, 2009 21:18
-
-
Save uhhuhyeah/231276 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SQL (0.1ms) SET client_min_messages TO 'panic' | |
SQL (0.1ms) SET client_min_messages TO 'notice' | |
Loading routes from /Users/davidamcclain/apps/notch8/loc_dashboard/vendor/plugins/community_engine/config/desert_routes.rb. | |
ThinkingSphinx::Deltas::Job Delete all (0.8ms) DELETE FROM "delayed_jobs" WHERE (handler LIKE '--- !ruby/object:ThinkingSphinx::Deltas::%') | |
SQL (0.3ms) begin | |
SQL (0.6ms) savepoint ts | |
SQL (0.0ms) PGError: ERROR: function "array_accum" already exists with same argument types | |
: CREATE AGGREGATE array_accum (anyelement) | |
( | |
sfunc = array_append, | |
stype = anyarray, | |
initcond = '{}' | |
); | |
SQL (0.2ms) rollback to savepoint ts | |
SQL (0.1ms) release savepoint ts | |
SQL (0.2ms) commit | |
SQL (0.1ms) begin | |
SQL (0.1ms) savepoint ts | |
SQL (0.0ms) PGError: ERROR: language "plpgsql" already exists | |
: CREATE LANGUAGE 'plpgsql'; | |
SQL (0.4ms) rollback to savepoint ts | |
SQL (0.1ms) release savepoint ts | |
SQL (0.1ms) commit | |
SQL (0.2ms) begin | |
SQL (0.9ms) savepoint ts | |
SQL (2.6ms) CREATE OR REPLACE FUNCTION crc32(word text) | |
RETURNS bigint AS $$ | |
DECLARE tmp bigint; | |
DECLARE i int; | |
DECLARE j int; | |
DECLARE word_array bytea; | |
BEGIN | |
i = 0; | |
tmp = 4294967295; | |
word_array = decode(replace(word, E'\\', E'\\\\'), 'escape'); | |
LOOP | |
tmp = (tmp # get_byte(word_array, i))::bigint; | |
i = i + 1; | |
j = 0; | |
LOOP | |
tmp = ((tmp >> 1) # (3988292384 * (tmp & 1)))::bigint; | |
j = j + 1; | |
IF j >= 8 THEN | |
EXIT; | |
END IF; | |
END LOOP; | |
IF i >= char_length(word) THEN | |
EXIT; | |
END IF; | |
END LOOP; | |
return (tmp # 4294967295); | |
END | |
$$ IMMUTABLE STRICT LANGUAGE plpgsql; | |
SQL (0.1ms) release savepoint ts | |
SQL (1.4ms) commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment