On Oct 20, 2012, at 11:34 PM, Barry Morrison wrote:

> Looking further at Postgresql, what's interesting.  Is it creates an 'id' 
> column and appends '_id' to what is assumed to be the id field (if none is 
> specified).  
> 
> Also, it appears the magic may have already created the indexes:

It's not actually PostgreSQL that's creating those.  That's Django's standard 
behavior.

1. It automatically creates an id column for any model that lacks an explicit 
primary key.
2. It automatically adds an index to foreign key models (for text fields, you 
get both the standard one and the varchar_pattern_ops one, which is technically 
no longer required).

--
-- Christophe Pettus
   x...@thebuild.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to