- 拼写错误
- 错别字
Levenshtein, n-gram
pg_trgm
select similarity('yue mian ke ji', 'yu mian ke ji')
fuzzystrmatch
#! /usr/bin/env bash | |
if (( EUID != 0 )); then | |
echo “Please run this command with sudo” 1>&2 | |
exit 1 | |
fi |
Levenshtein, n-gram
pg_trgm
select similarity('yue mian ke ji', 'yu mian ke ji')
fuzzystrmatch
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
from collections import defaultdict | |
from django.db.models.signals import * | |
class DisableSignals(object): | |
def __init__(self, disabled_signals=None): | |
self.stashed_signals = defaultdict(list) | |
self.disabled_signals = disabled_signals or [ | |
pre_init, post_init, | |
pre_save, post_save, |