pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Duarte Carreira <dncarreira@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Swathi P <swathi.bluepearl@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Query on postgres_fdw extension
Date: Fri, 21 Jan 2022 16:54:59 +0100
Message-ID: <881a552bf99081609275aa9fe151073ad569c059.camel@cybertec.at> (raw)
In-Reply-To: <CAHE-9zB3V2P3oVQ6xWq_9rT7xdy-HVegDaKL6po2K0P68w3YeA@mail.gmail.com>
References: <CAKtL=nkXe1zXK5SMcqnzDpCON+CUPHdnjJZfZonwYQa0BDkCGQ@mail.gmail.com>
	<CALj2ACUejnxHERB4QNvKV3qVW4VQ=a8Y+kuuPTseuwq0prVe3Q@mail.gmail.com>
	<CAKtL=n=OND+AYqztr57Njanj8M9iyy6uvfmp1yX2Zgk164Ejww@mail.gmail.com>
	<1883853.1621003992@sss.pgh.pa.us>
	<342e0b863a3b6fc4c31ab18c827cb9b165cdb365.camel@cybertec.at>
	<CAHE-9zD2Pzwig01bF4RXKbN1rY6Kbb5manK9o9oBqxivsE-JCg@mail.gmail.com>
	<780b4208700bb54138e5e17961282b26832a51a8.camel@cybertec.at>
	<CAHE-9zB3V2P3oVQ6xWq_9rT7xdy-HVegDaKL6po2K0P68w3YeA@mail.gmail.com>

On Fri, 2022-01-21 at 14:33 +0000, Duarte Carreira wrote:
> If we just create the 2 foreign tables, one complete and one without id,
> you can simply insert into the table without id and it will work fine.
> To select and show data, you use the "complete" table that has the id column.
> 
> No need for trigger and view. If I understood correctly.
> 
> I have this 2 table setup working.
> 
> It's a workaround that quickly escalates out of hand though... with little added value.

Sure, that will work.

I just wanted to show how you can do without dealing with two different
foreign tables explicitly.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (18+ messages)  latest in thread

Message-ID: <881a552bf99081609275aa9fe151073ad569c059.camel@cybertec.at>
Permalink:  ../881a552bf99081609275aa9fe151073ad569c059.camel@cybertec.at/
Also on:    postgresql.org/message-id/881a552bf99081609275aa9fe151073ad569c059.camel@cybertec.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: laurenz.albe@cybertec.at, dncarreira@gmail.com, tgl@sss.pgh.pa.us, swathi.bluepearl@gmail.com, bharath.rupireddyforpostgres@gmail.com, pgsql-general@lists.postgresql.org
  Subject: Re: Query on postgres_fdw extension
  In-Reply-To: <881a552bf99081609275aa9fe151073ad569c059.camel@cybertec.at>
  References: <CAKtL=nkXe1zXK5SMcqnzDpCON+CUPHdnjJZfZonwYQa0BDkCGQ@mail.gmail.com> <CALj2ACUejnxHERB4QNvKV3qVW4VQ=a8Y+kuuPTseuwq0prVe3Q@mail.gmail.com> <CAKtL=n=OND+AYqztr57Njanj8M9iyy6uvfmp1yX2Zgk164Ejww@mail.gmail.com> <1883853.1621003992@sss.pgh.pa.us> <342e0b863a3b6fc4c31ab18c827cb9b165cdb365.camel@cybertec.at> <CAHE-9zD2Pzwig01bF4RXKbN1rY6Kbb5manK9o9oBqxivsE-JCg@mail.gmail.com> <780b4208700bb54138e5e17961282b26832a51a8.camel@cybertec.at> <CAHE-9zB3V2P3oVQ6xWq_9rT7xdy-HVegDaKL6po2K0P68w3YeA@mail.gmail.com> <881a552bf99081609275aa9fe151073ad569c059.camel@cybertec.at>

* 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