Hacker News new | ask | show | jobs
by zapov 4671 days ago
Both Oracle and Postgres have objects and collections. This allows you to build hierarchical structures. Postgres unfortunately doesn't allow for recursive structures ;(

If you are interested in how to do it take a look here: https://blog.dsl-platform.com/postgres-bridge-between-worlds...

1 comments

It should be noted that Oracle's object types are a feature of PL/SQL, their imperative programming language.

PostgreSQL's concept of object-relational databases is baked into the SQL. Into the logical model of the data itself.

Put another way: Oracle doesn't have table inheritance.

We are using Oracle object types in plain SQL, so no, they are not PL/SQL exclusive. But yeah, you can do a lot less with them outside of PL/SQL.
Right, you're right, I overlooked CREATE TABLE OF.