May 2017
Beginner
416 pages
10h 37m
English
Suppose you have an inherited structure. Data is partitioned by date and you want to provide the most recent years to the end user. At some point, you might want to remove some data from the scope of the user without actually touching it. You might want to put data into some sort of archive or so.
PostgreSQL provides a simple means to achieve exactly that. First a new parent can be created:
test=# CREATE TABLE t_history (LIKE t_data); CREATE TABLE
The LIKE keyword allows you to create a table which has exactly the same layout as the t_data table. In case you have forgotten which columns t_data table actually has, this might come in handy as it saves you a lot of work. It is also possible ...
Read now
Unlock full access