\d+ configobjectsfull

                                          Table "kconfig.configobjectsfull"
    Column    |            Type             | Collation | Nullable | Default | Storage  | Stats target | Description 
--------------+-----------------------------+-----------+----------+---------+----------+--------------+-------------
 timestamp    | timestamp without time zone |           |          |         | plain    |              | 
 id           | bigint                      |           | not null |         | plain    |              | 
 key          | character varying(300)      |           | not null |         | extended |              | 
 username     | character varying(300)      |           |          |         | extended |              | 
 searchkey    | character varying(300)      |           |          |         | extended |              | 
 objectclass  | character varying(300)      |           | not null |         | extended |              | 
 objectstring | text                        |           |          |         | extended |              | 
 encrypted    | character varying(3)        |           |          |         | extended |              | 
 invalid      | character varying(3)        |           |          |         | extended |              | 
 editedby     | character varying(384)      |           |          |         | extended |              | 
 editcomment  | character varying(3072)     |           |          |         | extended |              | 
Triggers:
    configobjectsfull_insert_trigger BEFORE INSERT ON configobjectsfull FOR EACH ROW EXECUTE PROCEDURE configobjectsfull_insert_trigger()
Child tables: configobjectsfull_2010,
              configobjectsfull_2011,
              configobjectsfull_2012,
              configobjectsfull_2013,
              configobjectsfull_2014,
              configobjectsfull_2015,
              configobjectsfull_2016,
              configobjectsfull_2017,
              configobjectsfull_2018,
              configobjectsfull_2019

\d+ configobjectsfull_2019
                                       Table "kconfig.configobjectsfull_2019"
    Column    |            Type             | Collation | Nullable | Default | Storage  | Stats target | Description 
--------------+-----------------------------+-----------+----------+---------+----------+--------------+-------------
 timestamp    | timestamp without time zone |           |          |         | plain    |              | 
 id           | bigint                      |           | not null |         | plain    |              | 
 key          | character varying(300)      |           | not null |         | extended |              | 
 username     | character varying(300)      |           |          |         | extended |              | 
 searchkey    | character varying(300)      |           |          |         | extended |              | 
 objectclass  | character varying(300)      |           | not null |         | extended |              | 
 objectstring | text                        |           |          |         | extended |              | 
 encrypted    | character varying(3)        |           |          |         | extended |              | 
 invalid      | character varying(3)        |           |          |         | extended |              | 
 editedby     | character varying(384)      |           |          |         | extended |              | 
 editcomment  | character varying(3072)     |           |          |         | extended |              | 
Indexes:
    "configobjectsfull_2019_pkey" PRIMARY KEY, btree (id)
    "configobjectsfull_2019_i1" btree (key, username)
    "configobjectsfull_2019_i2" btree ("timestamp")
    "configobjectsfull_2019_i3" btree (key, username, searchkey)
Check constraints:
    "configobjectsfull_2019_timestamp_check" CHECK ("timestamp" >= '2019-01-01 00:00:00'::timestamp without time zone AND "timestamp" < '2020-01-01 00:00:00'::timestamp 
without time zone)
Inherits: configobjectsfull

Db=> \x
Expanded display is on.
Db=> \df+ configobjectsfull_insert_trigger
List of functions
-[ RECORD 1 ]-------+-------------------------------------------------------------------------------------------------
Schema              | xxxxxxxxxxx
Name                | configobjectsfull_insert_trigger
Result data type    | trigger
Argument data types | 
Type                | func
Volatility          | volatile
Parallel            | unsafe
Owner               | xxxxxxxxxxxxxxx
Security            | invoker
Access privileges   | =X/kconfig                                                                                      +
                    | kconfig=X/kconfig                                                                               +
                    | user_read=X/kconfig                                                                             +
                    | user_write=X/kconfig                                                                            +
                    | app_read=X/kconfig                                                                              +
                    | app_write=X/kconfig
Language            | plpgsql
Source code         |                                                                                                 +
                    | begin                                                                                           +
                    |     if (NEW.timestamp is null) then                                                             +
                    |         select clock_timestamp() into NEW.timestamp;                                            +
                    |     end if;                                                                                     +
                    |     if (NEW.id is null) then                                                                    +
                    |         select nextval('CONFIGROWIDSEQ') into NEW.id;                                           +
                    |     end if;                                                                                     +
                    |     if (NEW.timestamp < '2011-01-01')  then                                                     +
                    |         insert into  configObjectsFull_2010 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2011-01-01' and NEW.timestamp < '2012-01-01')  then                +
                    |         insert into  configObjectsFull_2011 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2012-01-01' and NEW.timestamp < '2013-01-01')  then                +
                    |         insert into  configObjectsFull_2012 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2013-01-01' and NEW.timestamp < '2014-01-01')  then                +
                    |         insert into  configObjectsFull_2013 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2014-01-01' and NEW.timestamp < '2015-01-01')  then                +
                    |         insert into  configObjectsFull_2014 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2015-01-01' and NEW.timestamp < '2016-01-01')  then                +
                    |         insert into  configObjectsFull_2015 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2016-01-01' and NEW.timestamp < '2017-01-01')  then                +
                    |         insert into  configObjectsFull_2016 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2017-01-01' and NEW.timestamp < '2018-01-01')  then                +
                    |         insert into  configObjectsFull_2017 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2018-01-01' and NEW.timestamp < '2019-01-01')  then                +
                    |         insert into  configObjectsFull_2018 values (new.*);                                     +
                    |     elsif (NEW.timestamp >= '2019-01-01' and NEW.timestamp < '2020-01-01')  then                +
                    |         insert into  configObjectsFull_2019 values (new.*);                                     +
                    |     else                                                                                        +
                    |         raise exception 'Date out of range. Check configObjectsFull_insert_trigger() function!';+
                    |     end if;                                                                                     +
                    |     return null;                                                                                +
                    | end;                                                                                            +
                    | 
Description         | 

