BUG #16395: error when selecting generated column in a foreign table
| От | PG Bug reporting form |
|---|---|
| Тема | BUG #16395: error when selecting generated column in a foreign table |
| Дата | |
| Msg-id | 16395-2f2e9f72bd22a6d1@postgresql.org обсуждение исходный текст |
| Ответы |
Re: BUG #16395: error when selecting generated column in a foreigntable
|
| Список | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 16395
Logged by: Mario Leonel
Email address: mario.ab.leonel@gmail.com
PostgreSQL version: 12.2
Operating system: Ubuntu 18.04
Description:
-- bd: postgres
CREATE TABLE public.test
(
id integer NOT NULL,
field1 integer NOT NULL,
field2 character varying COLLATE pg_catalog."default",
CONSTRAINT test_pkey PRIMARY KEY (id)
);
-- bd: test
CREATE FOREIGN TABLE public.test(
id integer NULL,
field1 integer NULL,
field2 character varying NULL COLLATE pg_catalog."default",
field_calc integer generated always as (field1 * 2) stored
)
SERVER fs_postgres;
test=# SELECT id, field1, field2, field_calc FROM public.test;
ERROR: column "field_calc" does not exist
CONTEXT: remote SQL command: SELECT id, field1, field2, field_calc FROM
public.test
test=# SELECT id, field1, field2 FROM public.test;
id | field1 | field2
----+--------+--------
1 | 2 | one
2 | 4 | two
3 | 6 | three
4 | 8 | four
(4 rows)
В списке pgsql-bugs по дате отправления: