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
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
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
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
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,