RE: Is PostgreSQL SQL Database Command Syntax Similar to MySQL/MariaDB?

From: Kevin Brannen <KBrannen(at)efji(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: RE: Is PostgreSQL SQL Database Command Syntax Similar to MySQL/MariaDB?
Date: 2020-03-30 22:30:24
Message-ID: SA0PR19MB42556ADF781E37F767864C1EA4CB0@SA0PR19MB4255.namprd19.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: Turritopsis Dohrnii Teo En Ming <ceo(at)teo-en-ming(dot)com>

> Is PostgreSQL SQL database command syntax similar to MySQL/MariaDB?

If you stuck to "standard SQL" in Mysql, you'll generally be fine; the differences will be pretty minor. The further you strayed from the standard will cause you more work -- usually. That being said, moving for any DB to another will always cause you to find DB-specific things. Of course, there are always a few things that can only be done with DB-specific code, so you'll be rewriting those parts with certainty (an example is the insert-or-update concept).

[Side note: I forced myself to read a good part of the SQL standard some time back and was amazed by how many times the phrase "implementation defined" was used, which helps to explain why all the DBs do some things so differently.]

The admin commands are quite different as well, be prepared for that, but I can't think of anything that Mysql can do that Pg can't as well. (Although it's been awhile since I had to use Mysql, so I may have forgotten something.)

Last but not least, please remember that all of those "unusual" things you had to do to get Mysql to work, or work around its bugs, won't be needed and will more than likely get in your way with Postgresql. I'm not saying the Pg is perfect, but that Mysql's bugs and oddities don't apply to Pg.

Good luck with your conversion and welcome to Pg!
Kevin
This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, and destroy the original transmission and its attachments without reading them or saving them to disk. Thank you.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Turritopsis Dohrnii Teo En Ming 2020-03-30 23:15:57 Re: Is PostgreSQL SQL Database Command Syntax Similar to MySQL/MariaDB?
Previous Message Don Seiler 2020-03-30 21:39:32 Re: Mixed Locales and Upgrading