By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| logid | jobid | time | logtext |
|---|---|---|---|
| 1 | 1 | 2024-03-05 11:50:36.506363 | logtext1 |
INSERT 0 1
| id | logid |
|---|---|
| 1 | 1 |
INSERT 0 1
| sequence_catalog | sequence_schema | sequence_name | data_type | numeric_precision | numeric_precision_radix | numeric_scale | start_value | minimum_value | maximum_value | increment | cycle_option |
|---|---|---|---|---|---|---|---|---|---|---|---|
| postgres | public | log_logid_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO |
| postgres | public | linked_to_log_id_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO |
SELECT 2
| setval |
|---|
| 2 |
SELECT 1
| setval |
|---|
| 2147483644 |
SELECT 1
| logid | jobid | time | logtext |
|---|---|---|---|
| 2147483645 | 1 | 2024-03-05 11:50:36.562488 | 2 less than int limit |
| 2147483646 | 1 | 2024-03-05 11:50:36.562488 | 1 less than int limit |
| 2147483647 | 1 | 2024-03-05 11:50:36.562488 | 2147483647, int limit |
| 2147483648 | 1 | 2024-03-05 11:50:36.562488 | +1 over int limit |
| 2147483649 | 1 | 2024-03-05 11:50:36.562488 | +2 over int limit |
| 9223372036854775807 | 1 | 2024-03-05 11:50:36.562488 | bigint limit, your new ceiling |
INSERT 0 6
| table_schema | table_name | column_name | data_type | udt_name | column_default | is_identity | identity_generation | identity_start | identity_increment | identity_maximum | identity_minimum |
|---|---|---|---|---|---|---|---|---|---|---|---|
| public | linked_to_log | id | bigint | int8 | nextval('linked_to_log_id_seq'::regclass) | NO | null | null | null | null | null |
| public | linked_to_log | logid | integer | int4 | null | NO | null | null | null | null | null |
| public | log | logid | bigint | int8 | nextval('log_logid_seq'::regclass) | NO | null | null | null | null | null |
| public | log | jobid | integer | int4 | null | NO | null | null | null | null | null |
| public | log | time | timestamp without time zone | timestamp | null | NO | null | null | null | null | null |
| public | log | logtext | text | text | null | NO | null | null | null | null | null |
SELECT 6
| sequence_catalog | sequence_schema | sequence_name | data_type | numeric_precision | numeric_precision_radix | numeric_scale | start_value | minimum_value | maximum_value | increment | cycle_option |
|---|---|---|---|---|---|---|---|---|---|---|---|
| postgres | public | log_logid_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO |
| postgres | public | linked_to_log_id_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO |
SELECT 2
ALTER TABLE
| table_schema | table_name | column_name | data_type | udt_name | column_default | is_identity | identity_generation | identity_start | identity_increment | identity_maximum | identity_minimum |
|---|---|---|---|---|---|---|---|---|---|---|---|
| public | linked_to_log | id | bigint | int8 | nextval('linked_to_log_id_seq'::regclass) | NO | null | null | null | null | null |
| public | linked_to_log | logid | bigint | int8 | null | NO | null | null | null | null | null |
| public | log | logid | bigint | int8 | nextval('log_logid_seq'::regclass) | NO | null | null | null | null | null |
| public | log | jobid | integer | int4 | null | NO | null | null | null | null | null |
| public | log | time | timestamp without time zone | timestamp | null | NO | null | null | null | null | null |
| public | log | logtext | text | text | null | NO | null | null | null | null | null |
SELECT 6