3 ms·
No, many of these are specific to Postgres. I don't know of any other database that has Postgres's rewrite system called Rules. Also other databases handle mixe
by combatentropy 7y ago
No, many of these are specific to Postgres. I don't know of any other database that has Postgres's rewrite system called Rules. Also other databases handle mixed-case identifiers differently. PostgreSQL is one of the databases that adheres the SQL standard most closely, which makes you think that many of these things would apply to other databases. But that's just it. Databases follow the standard willy nilly, so that may be a reason that in fact Postgres is different from them.
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/ https://www.enterprisedb.com/ is.
- paulryanrogers 7y ago> 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.
- cobythedog 7y agoThe current version (11) does: https://www.postgresql.org/docs/11/sql-createprocedure.html https://www.postgresql.org/docs/11/sql-createprocedure.html
- paulryanrogers 7y agoThat 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] [0] https://github.com/okbob/plpsm0 https://github.com/okbob/plpsm0