Re: BUG #16342: CREATE TABLE LIKE INCLUDING GENERATED column orderissue

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: BUG #16342: CREATE TABLE LIKE INCLUDING GENERATED column orderissue
Дата
Msg-id db920c8a-063e-a320-c5e8-096f0eedc154@2ndquadrant.com
обсуждение исходный текст
Ответ на BUG #16342: CREATE TABLE LIKE INCLUDING GENERATED column order issue  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16342: CREATE TABLE LIKE INCLUDING GENERATED column order issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2020-04-04 01:50, PG Bug reporting form wrote:
> postgres=# CREATE TABLE test (
>    funds float GENERATED ALWAYS AS (cast(funds_t AS double precision))
> STORED,
>    funds_t text,
>    id bigserial not null
> );
> CREATE TABLE
> 
> postgres=# CREATE TABLE IF NOT EXISTS test_temp (LIKE test INCLUDING
> GENERATED);
> ERROR:  XX000: unexpected varattno 3 in expression to be mapped
> LOCATION:  map_variable_attnos_mutator, rewriteManip.c:1255

Confirmed.  Attached is a patch to fix it.  Thanks for the report!

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #16333: position() function not equivalent to strpos()function when comparing citext
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16342: CREATE TABLE LIKE INCLUDING GENERATED column order issue