From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-hackers@lists.postgresql.org
Subject: ERROR: attribute number 6 exceeds number of columns 5
Date: Tue, 26 Nov 2019 15:04:51 +0100 (CET)
Message-ID: <VisenaEmail.200.231b0a41523275d0.16ea7f800c7@tc7-visena> (raw)
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
Attachments:
error.sql (application/sql, 1.3K) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: andreas@visena.com, pgsql-hackers@lists.postgresql.org
Subject: Re: ERROR: attribute number 6 exceeds number of columns 5
In-Reply-To: <VisenaEmail.200.231b0a41523275d0.16ea7f800c7@tc7-visena>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox