Reason for choosing postgreSQL
It turns out to manage software to SMEs with MySQL. It is found in the process of use. Many features are not, it is very difficult. Now intention to transfer PostgreSQL, the younger brother don't know about PostgreSQL, please help list the advantages of PostgreSQL, or It is mysql, and some of PostgreSQL, let me first write it, don't correct it.
PostgreSQL features:
1) Complete Transaction Support (Mysql, but incomplete) 2) Trigger (mysql None) 3) Function (mysql5.0 has added, the previous version should be written with C, very troublesome, now we haven't used it yet Over) 4) Store Procedure (MySQL5.0 has added) 5) Foreign Key (Mysql3.23) If you can support with InnoDB, but not well-limited) 6) Sequence (mysql None) 7) View Mysql None) 8) Support multiple languages to write trigger, function, procedure, as far as I know: 8.1> PL / PGSQL (Programmers for turning from Oracle) 8.2> PL / PHP 8.3> PL / Python 8.4> PL / TCL 8.5> PL / Perl 8.6> PL / Java (This I am Uncertain, I should be) 9) CURSOR10) Inherited 11) Support SQL9912) Support Object-Oriented Database 13) Support on TB's database
Disadvantages of PostgreSQL: 1, no new views are not supported. However, you can use rules to replace. If the application depends on the update view, do a certain risk. 2, the statement encountered in the transaction will cause the entire transaction to roll back. This may cause many troubles. 3, there is no real backup and recovery tool, only imported. 4, the syntax of the stored procedure / function is not standard, and it is different from Oracle, and is different from MSSQL. 5. There is no similar mysql in binlog, which cannot be used. 6. VARCHAR field also saves TRAIL BLANK, compares the character when the trail blank (this is a SQL standard, but it is not necessarily a good thing), so it is best not to use VARCHAR to do the primary key or foreign key Otherwise, you will not be careful after adding a space to make you hurt the brain. 7. When the string of the field length is stored in the database, it will be wrong, not automatically intercept. 8. To regular VACUMM to organize the database, otherwise the optimization error, However, version 7.4 has an automatic optimization tool. 9. Chinese character set to EUC_CN, relative Locale Collate is only Locale C, so when the initial database is set, Locale must select C, otherwise it will not be sorted normally. 10. Strong type Some statements can not be optimized, such as select * from table where int8_key = 1 Unable to use indexes, must be converted to Select * from table where int8_key = cast (1 as int8) 11. PSQLODBC Sometimes Crash your client application.
Synchronization engine:
More famous PostgreSQL synchronization engines have Slony-I and ERSERVER, all BSD authorized projects. Where SLONY is new, the latest version 1.02 supports postgreSQL8.0 Beta1 you can take a look at http://www.slony.org.