pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: mario.ab.leonel@gmail.com
Subject: BUG #16395: error when selecting generated column in a foreign table
Date: Mon, 27 Apr 2020 14:24:02 +0000
Message-ID: <16395-2f2e9f72bd22a6d1@postgresql.org> (raw)

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)



view thread (3+ messages)  latest in thread

Message-ID: <16395-2f2e9f72bd22a6d1@postgresql.org>
Permalink:  ../16395-2f2e9f72bd22a6d1@postgresql.org/
Also on:    postgresql.org/message-id/16395-2f2e9f72bd22a6d1@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, mario.ab.leonel@gmail.com
  Subject: Re: BUG #16395: error when selecting generated column in a foreign table
  In-Reply-To: <16395-2f2e9f72bd22a6d1@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox