PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16395
PG Version12.2
OSUbuntu 18.04
Opened2020-04-27 14:24:02+00
Reported byMario Leonel
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16395
Logged by:          Mario Leonel
Email address:      (redacted)
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)

Messages

DateAuthorSubject
2020-04-27 14:24:02+00PG Bug reporting formBUG #16395: error when selecting generated column in a foreign table
2020-04-28 14:19:30+00Peter EisentrautRe: BUG #16395: error when selecting generated column in a foreign table
2020-04-29 09:29:22+00Peter EisentrautRe: BUG #16395: error when selecting generated column in a foreign table