Ticket #3254: fts-pstgres.patch
File fts-pstgres.patch, 711 bytes (added by , 17 years ago) |
---|
-
base.py
30 30 # http://www.initd.org/tracker/psycopg/wiki/psycopg2_documentation#postgresql-status-message-and-executed-query 31 31 return cursor.query 32 32 33 def unquote_name(self, name): 34 return name.strip('"') 35 36 def fulltext_search_sql(self, field_name): 37 requoted_field_name = self.quote_name("%s_tsv" % (self.unquote_name(field_name))) 38 return "%s @@ to_tsquery(%%s)" % requoted_field_name 39 33 40 class DatabaseWrapper(BaseDatabaseWrapper): 34 41 features = DatabaseFeatures() 35 42 ops = DatabaseOperations()