Skip to content

Commit

Permalink
Move the PRIMARY KEY from the history table to the main one.
Browse files Browse the repository at this point in the history
  • Loading branch information
arkhipov committed May 23, 2016
1 parent 5a3a049 commit 6ec1c4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ sometimes it is better to use inheritance for this task. For example:
```SQL
CREATE TABLE employees_history
(
name text NOT NULL PRIMARY KEY,
name text NOT NULL,
department text,
salary numeric(20, 2),
sys_period tstzrange NOT NULL
Expand All @@ -362,7 +362,7 @@ CREATE TABLE employees_history
Then create the employees table:

```SQL
CREATE TABLE employees () INHERITS (employees_history);
CREATE TABLE employees (PRIMARY KEY(name)) INHERITS (employees_history);
```

Pruning history tables
Expand Down

0 comments on commit 6ec1c4d

Please sign in to comment.