diff --git a/ChangeLog b/ChangeLog
index b35fe430dd062321f2352b55141fce64796ac26d..a319b574780d000d80bec1fa9860af286dc38140 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 English Dolibarr ChangeLog
 
+***** ChangeLog for 3.0 compared to 2.9 *****
+
+For users:
+- New: When sending supplier orders by mail, a text is predefined.
+- New: Upgrade process works with Postgresql.
+
+For developer:
+- Qual: Renamed some fields into database to be more internationnal.
+
+
+
 ***** ChangeLog for 2.9 compared to 2.8 *****
 
 For users:
diff --git a/htdocs/install/mysql/migration/2.9.0-3.0.0.sql b/htdocs/install/mysql/migration/2.9.0-3.0.0.sql
index d7ee2708b5bdb3cd4fde3bf7ee5a4e3633aadc00..1cd3e3e81b0b056c0bcbfc7d05738bd4bd509d01 100644
--- a/htdocs/install/mysql/migration/2.9.0-3.0.0.sql
+++ b/htdocs/install/mysql/migration/2.9.0-3.0.0.sql
@@ -5,13 +5,17 @@
 -- This file must be loaded by calling /install/index.php page
 -- when current version is 2.8.0 or higher. 
 --
+-- To add a column:         ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
+-- To rename a column:      ALTER TABLE llx_table CHANGE oldname newname varchar(60);
+-- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60);
+--
 
-
+-- Add recuperableonly field
 alter table llx_product       add column recuperableonly integer NOT NULL DEFAULT '0' after tva_tx;
-
 alter table llx_product_price add column recuperableonly integer NOT NULL DEFAULT '0' after tva_tx;
 
- 
-alter table llx_product change column envente tosell smallint DEFAULT 1;
-alter table llx_product add column tobuy smallint DEFAULT 1 after tosell;
+-- Rename envente into tosell and add tobuy
+alter table llx_product change column envente tosell tinyint DEFAULT 1;
+alter table llx_product add column tobuy tinyint DEFAULT 1 after tosell;
+alter table llx_product_price change column envente tosell tinyint DEFAULT 1;
  
\ No newline at end of file
diff --git a/htdocs/lib/databases/pgsql.lib.php b/htdocs/lib/databases/pgsql.lib.php
index dd880069b21c229d5e3b703c8351d60e9acecaee..ec524a974f0d61492c589bf5f9e2d30104573fe9 100644
--- a/htdocs/lib/databases/pgsql.lib.php
+++ b/htdocs/lib/databases/pgsql.lib.php
@@ -211,7 +211,14 @@ class DoliDb
 			# We remove start of requests "ALTER TABLE tablexxx" if this is a DROP INDEX
 			$line=preg_replace('/ALTER TABLE [a-z0-9_]+ DROP INDEX/i','DROP INDEX',$line);
 
-			# alter table add primary key (field1, field2 ...) -> We remove the primary key name not accepted by PostGreSQL
+            # Translate order to rename fields
+            if (preg_match('/ALTER TABLE ([a-z0-9_]+) CHANGE COLUMN ([a-z0-9_]+) ([a-z0-9_]+)(.*)$/i',$line,$reg))
+            {
+            	$line = "-- ".$line." replaced by --\n";
+                $line.= "ALTER TABLE ".$reg[1]." RENAME COLUMN ".$reg[2]." TO ".$reg[3];
+            }
+
+            # alter table add primary key (field1, field2 ...) -> We remove the primary key name not accepted by PostGreSQL
 			# ALTER TABLE llx_dolibarr_modules ADD PRIMARY KEY pk_dolibarr_modules (numero, entity);
 			if (preg_match('/ALTER\s+TABLE\s*(.*)\s*ADD\s+PRIMARY\s+KEY\s*(.*)\s*\((.*)$/i',$line,$reg))
 			{