patch: improve "user mapping not found" error message

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: patch: improve "user mapping not found" error message
Date: 2023-06-23 07:45:05
Message-ID: CAB8KJ=jFzNaeyFtLcTZNOc6fd1+F93pGVLFa-wyt31wn7VNxqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

Mild corner-case annoyance while doing Random Experimental Things:

postgres=# SELECT * FROM parttest;
ERROR: user mapping not found for "postgres"

Okaaaay, but which server?

postgres=# \det
List of foreign tables
Schema | Table | Server
--------+---------------+-----------
public | parttest_10_1 | fdw_node2
public | parttest_10_3 | fdw_node3
public | parttest_10_5 | fdw_node4
public | parttest_10_7 | fdw_node5
public | parttest_10_9 | fdw_node6
(5 rows)

(Muffled sound of small patch hatching) aha:

postgres=# SELECT * FROM parttest;
ERROR: user mapping not found for user "postgres", server "fdw_node5"

Regards

Ian Barwick

Attachment Content-Type Size
user-mapping-not-found-message-improvement.v1.patch text/x-patch 1008 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-06-23 07:53:30 Re: Deleting prepared statements from libpq.
Previous Message Ashutosh Bapat 2023-06-23 07:43:44 Re: Infinite Interval