The solution to this problem, it turns out, was to dump the database, shut down PostgreSQL, move the old data directory, and create a new one withinitdb -locale=C. I then restored the database, and suddenly=andLIKE(and the unique index) were doing the same thing. Hallelujah! Naturally...
/** set_pglocale_pgservice** Set application-specific locale and service directory** This function takes the value of argv[0] rather than a full path.** (You may be wondering why this is in exec.c. It requires this module's* services and doesn't introduce any new dependencies, so th...
initdb -D $PGDATA -E UTF8 --locale=C -U postgres -W 您應該收到下列輸出: 設定PostgreSQL 執行下列命令: 主控台 cd /root/postgresql-9.3.5/contrib/start-scripts cp linux /etc/init.d/postgresql 修改/etc/init.d/postgresql 檔案中的兩個變數。 這個前綴會設定為 PostgreSQL 的安裝路徑:/opt/pgsql...
CREATEORREPLACEFUNCTIONnspname.myfunc(arg1_TEXT, arg2_INTEGER)RETURNSVOIDLANGUAGESQLSTABLEPARALLELSAFEROWS1RETURNSNULLONNULLINPUTAS$function$SELECT1;$function$; 使用合理的Locale选项 默认使用en_US.UTF8,没有特殊理由不得更改。 默认的collate规则必须为C,避免字符串索引问题。 https://mp.weixin.qq.com/s/...