I
I
Igor2018-12-13 17:57:26
MySQL
Igor, 2018-12-13 17:57:26

I study databases. The lessons use MySQL. Is it possible to replace it with PostgreSQL without losing compatibility?

How different is the dialect? Will MySQL code work in Postgre out of the box?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
vman, 2018-12-13
@hddn

To be precise, here are links to the standards that are supported by the database
https://dev.mysql.com/doc/refman/8.0/en/compatibil...
https://www.postgresql.org/docs/current/features.html
Most likely you will come across a different way of concatenating strings, functions (dates, strings, etc.). Databases, tables, indexes, views, etc. are created differently.
As I wrote in the comments, do the tasks in parallel, get a good experience.

S
Sergey Gornostaev, 2018-12-13
@sergey-gornostaev

First, MySQL does not fully support the SQL-92 standard, PostgreSQL almost fully supports SQL:2011. Secondly, the principles of operation of the DBMS differ significantly in many respects. So most likely you will encounter incompatibilities. It's better to take a textbook and study SQL, not its dialects.

P
ponaehal, 2018-12-14
@ponaehal

In order to understand/feel the SQL language, MySQL is quite enough.
Once you learn the 4 basic DML commands and a couple of DDL commands, you can start thinking about the differences and platform specific. Strictly IMHO.

D
Dmitry Dart, 2018-12-13
@gobananas

It is forbidden. More precisely, it is highly undesirable. They have very different settings, internal optimization mechanisms, SQL standards are different

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question