Today I have started my first steps into postgresql, since its recommended 
by the Django team.

I came across several issues, that I solved patiently one by one.

1) Creating tables under postgresql requires to login as a different OS 
login, from which you don't even know the password.  Fine, I found the 
solution and created the database.

2) After running syncdb, you can't simply execute a simple insert sql like 
this:

    INSERT INTO App_contacttype (contact_type, company_id) VALUES ('Buyer', 
1),('Seller', 1);

Since Django creates it with quotes the table becomes case sensitive, hence 
it has to be like this:

    INSERT INTO "App_contacttype" (contact_type, company_id) VALUES 
('Buyer', 1),('Seller', 1);

But the problems seem never to end. Now suddenly the execution of the 
insert script says 

    ERROR: value too long for type character varying(40)
    SQL state: 22001

In MySQL this was no problem. I don't know, right now I am getting a bit of 
cold feet, maybe I should just stick to MySQL.

The only reason I was considering postgresql was that some research 
suggested postgresql has much better support for changing Schemas along the 
way than MySQL.  

However considering http://south.aeracode.org/ would take away all the pain 
of syncing Schemas, would I even need to worry about Schema changes at all 
no matter what the underlying database is? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/26gOJtDT6UsJ.
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