- with context.db.cursor(cursor_factory=psycopg2.extras.DictCursor) as cur:
- if nctx.tokenizer != 'legacy':
- cur.execute("SELECT word FROM word WHERE type = 'P' and word = any(%s)",
- (plist,))
- else:
- cur.execute("""SELECT word FROM word WHERE word = any(%s)
- and class = 'place' and type = 'postcode'""",
- (plist,))
+ with context.db.cursor() as cur:
+ cur.execute("SELECT word FROM word WHERE type = 'P' and word = any(%s)",
+ (plist,))