pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bernd Lentes <bernd.lentes@helmholtz-muenchen.de>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Update "usename" in pg_user
Date: Tue, 14 Nov 2023 12:56:24 +0000
Message-ID: <PR3PR04MB73409EB3F2695DA61418F784D6B2A@PR3PR04MB7340.eurprd04.prod.outlook.com> (raw)

Hi,

the last time i wrote a SQL command is about 20 years ago.
So I'm asking for your advice.
I have a DB which is accessed by ~ 40 users.
The users are in pg_user and authenticated with LDAP.
Due to change of the LDAP server I need to modify the username now.
From firstname.lastname to firstname.lastname@helmholtz-munich.de.
I tried the following (just for one user to test it):

update pg_user set usename = 'usename@helmholtz-munich.de' where usename = 'dorota.germann';

It didn't work. I got this message (unfortunately in german):
postgres=# update pg_user set usename = 'usename@helmholtz-munich.de' where usename = 'dorota.germann';
FEHLER:  kann Sicht »pg_shadow« nicht aktualisieren
DETAIL:  Sichten, die nicht aus einer einzigen Tabelle oder Sicht lesen, sind nicht automatisch aktualisierbar.
HINT:  Um Aktualisieren der Sicht zu ermöglichen, richten Sie einen INSTEAD OF UPDATE Trigger oder eine ON UPDATE DO INSTEAD Regel ohne Bedingung ein.

Any idea ?

Bernd

--
Bernd Lentes
System Administrator
MCD
Helmholtzzentrum München
+49 89 3187 1241
bernd.lentes@helmholtz-munich.de
https://www.helmholtz-munich.de/en/mcd

Helmholtz Zentrum München – Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstraße 1, D-85764 Neuherberg, https://www.helmholtz-munich.de
Geschäftsführung: Prof. Dr. med. Dr. h.c. Matthias H. Tschöp, Prof. Dr. Dr. h.c. mult. Martin Hrabě de Angelis (komm.) | Aufsichtsratsvorsitzende: MinDir’in Prof. Dr. Veronika von Messling
Registergericht: Amtsgericht München HRB 6466 | USt-IdNr. DE 129521671


view thread (10+ messages)  latest in thread

Message-ID: <PR3PR04MB73409EB3F2695DA61418F784D6B2A@PR3PR04MB7340.eurprd04.prod.outlook.com>
Permalink:  ../PR3PR04MB73409EB3F2695DA61418F784D6B2A@PR3PR04MB7340.eurprd04.prod.outlook.com/
Also on:    postgresql.org/message-id/PR3PR04MB73409EB3F2695DA61418F784D6B2A@PR3PR04MB7340.eurprd04.prod.outlook.com

 · 

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-admin@postgresql.org
  Cc: bernd.lentes@helmholtz-muenchen.de, pgsql-admin@lists.postgresql.org
  Subject: Re: Update "usename" in pg_user
  In-Reply-To: <PR3PR04MB73409EB3F2695DA61418F784D6B2A@PR3PR04MB7340.eurprd04.prod.outlook.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