ERROR: attribute number 6 exceeds number of columns 5

2019-11-26 Thread Andreas Joseph Krogh
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,

Re: ERROR: attribute number 6 exceeds number of columns 5

2019-11-26 Thread Tom Lane
Andreas Joseph Krogh 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

Re: ERROR: attribute number 6 exceeds number of columns 5

2019-11-26 Thread Kyotaro Horiguchi
At Tue, 26 Nov 2019 10:49:11 -0500, Tom Lane wrote in > Andreas Joseph Krogh 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, interesti

Re: ERROR: attribute number 6 exceeds number of columns 5

2020-01-07 Thread Tom Lane
Kyotaro Horiguchi writes: > At Tue, 26 Nov 2019 10:49:11 -0500, Tom Lane wrote in >> 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 >> exp

Re: ERROR: attribute number 6 exceeds number of columns 5

2020-01-07 Thread Tom Lane
I wrote: > So I believe that the real problem here is that the executor is > evaluating GENERATED expressions at the wrong time. It's evaluating > them against the pre-conversion tuples when it should be evaluating > them against the post-conversion tuples. We need to go fix that, > rather than i