BUG #17328: import foreign schema never reports errors - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17328: import foreign schema never reports errors
Date
Msg-id 17328-a6eb5e7fc1e1abad@postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17328
Logged by:          Mark Jones
Email address:      boatcoder@gmail.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.


pgsql-bugs by date:

Previous
From: Reid Thompson
Date:
Subject: Re: FATAL: postmaster became multithreaded during startup
Next
From: PG Bug reporting form
Date:
Subject: BUG #17329: Aggregate Functions Precision Error