﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29965	Postgresql hstore extension not initialized in testing	David Vogt	nobody	"I'm using pytest-django, so I'm not 100% sure this belongs here or with pytest-django itself, but nonetheless:

In one of my projects, I'm using HStore fields from the django.contrib.postgres package. The HStore extension needs to be registered with psycopg2 on a per-connection basis. changeset:f7b0532ec0cf703849ef (as a followup to changeset:86a18dc46a) skips registering on ""unknown"" databases, which then leads to the extension missing when running tests.

It seems that the extension is properly registered when creating the DB for each test run, but not when reusing it.

The current workaround is a custom signal handler on `connection_created` to call `psycopg2.exttras.register_hstore()` explicitly (without OID parameters, so it forces auto-detection)."	Bug	closed	contrib.postgres	2.1	Normal	needsinfo	hstore, postgresql		Unreviewed	0	0	0	0	0	0
