Re:Common mistakes in PostgreSQL
by paulryanrogers on Friday May 03, 2019 @10:01AM
(#19818490)
> PostgreSQL is one of the databases that adheres the SQL standard most closely...
Minor nit, Pg doesn't have SQL standard stored procedures; a.k.a. SQL/PSM. Mysql and DB2 do however.
Re:Common mistakes in PostgreSQL
by cobythedog on Friday May 03, 2019 @11:17AM
(#19819162)
The current version (11) does: https://www.postgresql.org/docs/11/sql-createprocedure.html
Re:Common mistakes in PostgreSQL
by paulryanrogers on Friday May 03, 2019 @06:02PM
(#19822678)
That is the command to create one, but the syntax of the definition body is what does not comply with SQL/PSM.
Looks like there is an extension but it hasn't been updated in 8 years as doesn't appear to be production ready yet[0]
And yet, yes! The best practice, obviously, is to always use Postgres. So --- what other flavors of SQL?
More seriously, I have read that SQLite is often similar to Postgres. Its main author actually has said in a talk that when making decisions he asks, "What would Postgres do?" Also I have heard that Postgres is similar to Oracle, so much that you could move from Oracle to Postgres with a thin layer of compatibility. In fact I think that's what https://www.enterprisedb.com/ is.