BUG #17328: import foreign schema never reports errors

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: boatcoder(at)gmail(dot)com
Subject: BUG #17328: import foreign schema never reports errors
Date: 2021-12-08 17:19:45
Message-ID: 17328-a6eb5e7fc1e1abad@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17328
Logged by: Mark Jones
Email address: boatcoder(at)gmail(dot)com
PostgreSQL version: 14.0
Operating system: MacOS (but not important)
Description:

With a statement like:
`import foreign schema "public" limit to (public.segment_over_1) from
server metrics into public;`
You never get an error, even if that table does not exist on the FDW server.
This makes it a multi-step process to find out if what you told Postgres to
do was actually done. You have to import the schema, then check for the
existence of the table. Seems like this should create an error if the
remote table does not exist.

In my case it was during unit test where Django was creating the server
during a migration and then changing the db name to start with test_. Then
my code internal to the application was trying to import the schema from the
wrong server. I'm a bit embarrassed how long it took me figure out what was
going on, but a simple error during the import would have made it very
obvious.

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-12-08 21:02:56 BUG #17329: Aggregate Functions Precision Error
Previous Message Reid Thompson 2021-12-08 14:46:04 Re: FATAL: postmaster became multithreaded during startup