Creating children tables
suggest changeCREATE TABLE users (username text, email text);
CREATE TABLE simple_users () INHERITS (users);
CREATE TABLE users_with_password (password text) INHERITS (users);
Our three tables look like this:
users
| Column | Type |
|---|---|
| username | text |
| text |
simple_users
| Column | Type |
|---|---|
| username | text |
| text |
users_with_password
| Column | Type |
|---|---|
| username | text |
| text | |
| password | text |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents