Difference between revisions of "Difference MySQL PostGreSQL"

From IMSMA Wiki
Jump to: navigation, search
Line 8: Line 8:
  
 
== Upgrading Views from mySQL to PostreSQL ==__NOEDITSECTION__
 
== Upgrading Views from mySQL to PostreSQL ==__NOEDITSECTION__
 +
When upgrading from {{IMSMANG}} 5.08.04 to 6.0, the database views need to be adapted, i.e. changed from mySQL syntax to PostgreSQL syntax. The country focal point is taking care of this. For reference, this section describes the main changes encountered. This can also be used as a tutorial for creating views in PostgreSQL, for {{IMSMANG}} administrators who were used to creating them in mySQL.
 +
 +
=== Case sensitivity and column names ===__NOEDITSECTION__
 +
 +
=== The GROUP BY clause ===__NOEDITSECTION__
 +
 +
=== IF and IFNULL (mySQL) / CASE (PostgreSQL) statements ===__NOEDITSECTION__
 +
 +
=== Date manipulations ===__NOEDITSECTION__
 +
 +
=== CAST AS CHAR utf8 (mySQL) ===__NOEDITSECTION__
 +
  
 
{{NavBox Technical Notes}}
 
{{NavBox Technical Notes}}
  
 
[[Category:NAA]]
 
[[Category:NAA]]

Revision as of 08:55, 19 June 2014

Ambox warning blue construction.png This page is under construction

The biggest differences are:

  • PostGreSQL is case sensitive
  • Command/function
  • Dates are stored without format in PostGreSQL
  • Round off
  • Customised functions

Upgrading Views from mySQL to PostreSQL

When upgrading from IMSMANG 5.08.04 to 6.0, the database views need to be adapted, i.e. changed from mySQL syntax to PostgreSQL syntax. The country focal point is taking care of this. For reference, this section describes the main changes encountered. This can also be used as a tutorial for creating views in PostgreSQL, for IMSMANG administrators who were used to creating them in mySQL.

Case sensitivity and column names

The GROUP BY clause

IF and IFNULL (mySQL) / CASE (PostgreSQL) statements

Date manipulations

CAST AS CHAR utf8 (mySQL)