Created
May 14, 2009 20:28
-
-
Save davidray/111883 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
| -- execute("CREATE INDEX people_fts_vector_index ON people USING gist(vector);") | |
| -> 0.0040s | |
| -> 0 rows | |
| -- execute("CREATE FUNCTION people_trigger() RETURNS trigger AS $$\n begin\n new.vector :=\n setweight(to_tsvector('pg_catalog.english', coalesce(new.first_name,'')), 'B') ||\n setweight(to_tsvector('pg_catalog.english', coalesce(new.last_name,'')), 'B') ||\n setweight(to_tsvector('pg_catalog.english', coalesce(new.first_name_soundex,'')), 'A') ||\n setweight(to_trake aborted! | |
| ActiveRecord::ActiveRecordError: ERROR: language "plpgsql" does not exist: CREATE FUNCTION people_trigger() RETURNS trigger AS $$ | |
| begin | |
| new.vector := | |
| setweight(to_tsvector('pg_catalog.english', coalesce(new.first_name,'')), 'B') || | |
| setweight(to_tsvector('pg_catalog.english', coalesce(new.last_name,'')), 'B') || | |
| setweight(to_tsvector('pg_catalog.english', coalesce(new.first_name_soundex,'')), 'A') || | |
| setweight(to_tsvector('pg_catalog.english', coalesce(new.last_name_soundex,'')), 'A'); | |
| return new; | |
| end | |
| $$ LANGUAGE plpgsql; | |
| (See full trace by running task with --trace) | |
| rake aborted! | |
| Command failed with status (1): [/home/david/opt/jruby/bin/jruby -S rake db...] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment