Skip to content

Instantly share code, notes, and snippets.

@camwhite
Created March 14, 2019 23:15
Show Gist options
  • Save camwhite/92e9f6604c5c3c01806802fe54178372 to your computer and use it in GitHub Desktop.
Save camwhite/92e9f6604c5c3c01806802fe54178372 to your computer and use it in GitHub Desktop.
const trigger = `CREATE TRIGGER post_vector_update BEFORE INSERT OR UPDATE ON "users" FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger("post_text", 'pg_catalog.english', ${searchFields.join(', ')})`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment