If you stick to stock python commands virtualenv shouldn't be involved at all and you can just point to the system python.
Thanks, Alex On 06/16/2014 08:16 PM, Lachlan Musicman wrote: > Thanks Russ, appreciated. > > Out of interest, how do people use plpythonu in postgres when virtualenv'd? > > I'm seeing a lot of "set the PYTHONPATH envvar in Postgres" answers is > this the way? > > What if I have 3 virtualenvs (dev, stage, prod) on the same machine, > each grabbing a different DB (dev, stage, prod) from the same postgres > server? I guess I set it to the PATH to prod's virtualenv because it's > the most conservative but closest to dev? > > L. > > On 17 June 2014 13:04, Russell Keith-Magee <russ...@keith-magee.com> wrote: >> >> On Tue, Jun 17, 2014 at 9:25 AM, Lachlan Musicman <data...@gmail.com> wrote: >>> >>> Thank Glen, appreciated. >>> >>> Now reading about indexes I can't believe I've not used them previously. >> >> >> Indicies are definitely your friend - *especially* on PostgreSQL. :-) >> >>> >>> Does the addition of "db_index=True" to a field require a migration, >>> or is it acceptable to just add. I guess that it will require a >>> migration, since it's a DB level change. Or an instruction to the DB >>> to perform an action that will stay in the DB, rather than within the >>> app? >>> >> Yes, a migration will be required. Once tables have been created, no change >> to the model file are reflected in the database unless you perform a >> migration. >> >> In raw PostgreSQL compatible SQL, you're looking for: >> >> CREATE INDEX "appname_tablename_columnname" ON "appname_tablename" >> ("columnname"); >> >> (substituting the app name, table name and column name as appropriate). This >> will create a BTree index. There are other index types and options for >> indicies, all of which have different search properties; however, if this is >> your first time really using indicies, a BTree is a decent place to start. >> >> Yours, >> Russ Magee %-) >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAJxq848Mgm5z5vJtkez6u8THMknZOk6FO5joB0O-mDC0O3T4CQ%40mail.gmail.com. >> >> For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/539FE53B.1050100%40wildintellect.com. For more options, visit https://groups.google.com/d/optout.