#1051: Add support to set search_path in PostgreSQL --------------------------------------------------------+------------------- Reporter: Mao Xizeng <mao.xiz...@gmail.com> | Owner: nobody Status: closed | Milestone: Component: Database layer (models, ORM) | Version: SVN Resolution: duplicate | Keywords: PostgreSQL Schemas Stage: Design decision needed | Has_patch: 1 Needs_docs: 0 | Needs_tests: 1 Needs_better_patch: 0 | --------------------------------------------------------+------------------- Comment (by MarioGonzalez <gonzalema...@gmail.com>):
Adding the workaround wrote by 'akaihola' breaks syncdb due that postgres does't need the schema name into the index name and Django uses app_name + db_table to build the index name {{{ class SomeClass(models.Model): name = models.ForeignKey(Other) class Meta: db_table = 'my_schema"."my_table' }}} syncdb will attempt to execute: {{{ CREATE INDEX "my_schema"."my_table_name" ON other..... }}} What I did was the output produced by "manage.py sql" and psql $ python manage.py sql myapp | psql <mydb> Then $ python manage.py sqlindexes modify the content and pass it out to psql again. -- Ticket URL: <http://code.djangoproject.com/ticket/1051#comment:20> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.