Skip to content

Instantly share code, notes, and snippets.

@oukayuka
Last active December 17, 2015 07:29
Show Gist options
  • Save oukayuka/5573239 to your computer and use it in GitHub Desktop.
Save oukayuka/5573239 to your computer and use it in GitHub Desktop.
PostgreSQLのpg_trgmでマルチバイト文字を使えるようにするためのHomebrewパッチ。
--- a/contrib/pg_trgm/trgm.h 2013-05-14 11:20:48.000000000 +0900
+++ b/contrib/pg_trgm/trgm.h 2013-05-14 11:20:42.000000000 +0900
@@ -12,7 +12,7 @@
/* options */
#define LPADDING 2
#define RPADDING 1
-#define KEEPONLYALNUM
+/* #define KEEPONLYALNUM */
/*
* Caution: IGNORECASE macro means that trigrams are case-insensitive.
* If this macro is disabled, the ~~* operator must be removed from the
@oukayuka
Copy link
Author

インストールの前に

$ brew edit postgresql

で、以下のように書き換える。

  def patches
-    DATA
+    {
+      :p1 => DATA,
+      :p0 => 'https://gist.github.com/oukayuka/5573239/download'
+    }
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment