From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | ERROR: attribute number 6 exceeds number of columns 5 |
Date: | 2019-11-26 14:04:51 |
Message-ID: | VisenaEmail.200.231b0a41523275d0.16ea7f800c7@tc7-visena |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Run the attached script and you'll get:
psql -f error.sql -d test
psql:error.sql:37: ERROR: attribute number 6 exceeds number of columns 5
Splitting up the alter-table like this makes it work:
alter table access
add column start_timestamp timestamp not null DEFAULT CURRENT_TIMESTAMP,
add column end_timestamp timestamp
;
alter table access add column tsrange TSRANGE NOT NULL GENERATED ALWAYS AS
(tsrange(start_timestamp, end_timestamp, '[)')) STORED
;
--
Andreas Joseph Krogh
Attachment | Content-Type | Size |
---|---|---|
error.sql | application/sql | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | v.makarov | 2019-11-26 14:59:25 | [PATCH] Increase the maximum value track_activity_query_size |
Previous Message | Ranier Vilela | 2019-11-26 13:45:10 | RE: [PATCH] Remove twice assignment with var pageop (nbtree.c). |