From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Joseph Krogh <andreas@visena.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: ERROR: attribute number 6 exceeds number of columns 5
Date: Tue, 26 Nov 2019 10:49:11 -0500
Message-ID: <6352.1574783351@sss.pgh.pa.us> (raw)
In-Reply-To: <VisenaEmail.200.231b0a41523275d0.16ea7f800c7@tc7-visena>
References: <VisenaEmail.200.231b0a41523275d0.16ea7f800c7@tc7-visena>
Andreas Joseph Krogh <andreas@visena.com> writes:
> 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
Hmm, interesting. IMO, that *should* have thrown an error, but of
course not that one. The ADD COLUMN operations are all processed
in parallel, so it's not okay for one of them to have a GENERATED
expression that refers to another one of the new columns. But you
should have gotten a "no such column" type of error, not a run-time
cross-check failure.
regards, tom lane
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: tgl@sss.pgh.pa.us, andreas@visena.com, pgsql-hackers@lists.postgresql.org
Subject: Re: ERROR: attribute number 6 exceeds number of columns 5
In-Reply-To: <6352.1574783351@sss.pgh.pa.us>
* 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