pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Erik Rijkers <er@xs4all.nl>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Sergei Kornilov <sk@zsrv.org>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Jaime Casanova <jaime.casanova@2ndquadrant.com>
Subject: Re: [HACKERS] generated columns
Date: Thu, 4 Apr 2019 13:01:09 +0200
Message-ID: <63ef7f01-b460-e26c-84f7-5e13c66662ff@2ndquadrant.com> (raw )
In-Reply-To: <cbf4751d-faef-ce86-6f37-63a5f1e67346@lab.ntt.co.jp >
References: <b151f851-4019-bdb1-699e-ebab07d2f40a@2ndquadrant.com >
<20180119051804.GC12826@paquier.xyz >
<2e3d5147-16f8-af0f-00ab-4c72cafc896f@2ndquadrant.com >
<20180131131804.GB1586@paquier.xyz >
<bf9c8765-1aa0-432a-442e-45f715ebe4e7@2ndquadrant.com >
<20180202022532.GA84623@paquier.xyz >
<050e663d-d915-f61b-af96-5a09c10ade02@2ndquadrant.com >
<79e4de23-52e3-2c45-9ba0-5f6932f590aa@2ndquadrant.com >
<28574501540912440@iva5-750e13568e4d.qloud-c.yandex.net >
<2ddd0bfa-0fcd-35ec-266c-f03cf72fc581@2ndquadrant.com >
<26129f50-cf47-2013-8f9b-e7a98853aa69@2ndquadrant.com >
<17fd00ff02ede468e2a3d63ff8cd5ff7@xs4all.nl >
<e61c597ac4541b77750594eea73a774c@xs4all.nl >
<59e69246-8f32-b3cb-af4c-8c359d4049c7@2ndquadrant.com >
<c743c3c6-93a3-0b23-20af-f0c15867f1d9@2ndquadrant.com >
<d87903a2723f6e31c15e4a90ba681a75@xs4all.nl >
<d873b54908ddc08e9649576fdf169d25@xs4all.nl >
<854c50a1-b050-1308-4222-a6278b079c7d@2ndquadrant.com >
<cbf4751d-faef-ce86-6f37-63a5f1e67346@lab.ntt.co.jp >
On 2019-04-04 11:42, Amit Langote wrote:
> Hmm, I'm afraid we might get bug reports if we go with this. Why is it OK
> to get null in this case when a user explicitly asked for 'foo'?
The way stored generated columns work on foreign tables is that the
to-be-stored value is computed, then given to the foreign table handler,
which then has to store it, and then return it later when queried.
However, since the backing store of a foreign table is typically
modifiable directly by the user via other channels, it's possible to
create situations where actually stored data does not satisfy the
generation expression. That is the case here. I don't know of a
principled way to prevent that. It's just one of the problems that can
happen when you store data in a foreign table: You have very little
control over what data actually ends up being stored.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
view thread (112+ messages) latest in thread
Message-ID: <63ef7f01-b460-e26c-84f7-5e13c66662ff@2ndquadrant.com>
Permalink: ../63ef7f01-b460-e26c-84f7-5e13c66662ff@2ndquadrant.com/
Also on: postgresql.org/message-id/63ef7f01-b460-e26c-84f7-5e13c66662ff@2ndquadrant.com
copy link · copy postgr.es
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-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, Langote_Amit_f8@lab.ntt.co.jp, er@xs4all.nl, sk@zsrv.org, michael.paquier@gmail.com, jaime.casanova@2ndquadrant.com
Subject: Re: [HACKERS] generated columns
In-Reply-To: <63ef7f01-b460-e26c-84f7-5e13c66662ff@2ndquadrant.com>
* 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