Two specific problems are addressed in #761976: DatabaseSchema_pgsql::changeField() is broken and #890090: Inserting into a just created table fails when trying to set a value to a serial , this fixes two remaining issues which are actually in user.install and system.install, but at least the code in system.install is only run on postgresql and I feel already bad creating yet another critical :)

Changes in this patch:
- Change "user.picture <> 0" to "user.picture <> ''". Should be obvious :)
- Escape field names
- Make the DROP DOMAIN queries a bit more error-proof by adding an IF EXISTS.

The problem with the system update function is that, if I understood it correctly, it actually runs on the whole database. If there are other tables in the same database, they will be affected too. Maybe that needs to be addressed as well but is probably not critical...

Files: 
CommentFileSizeAuthor
pgsql_fixes.patch1.71 KBBerdir
PASSED: [[SimpleTest]]: [MySQL] 23,243 pass(es). View

Comments

Berdir’s picture

Assigned: Unassigned » Berdir
Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community

Makes complete sense. Let's get this one in.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD! Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.