Re: Database-level collation version tracking

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Database-level collation version tracking
Date: 2022-03-31 09:14:29
Message-ID: 202203310914.a3menj54uord@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-Feb-14, Peter Eisentraut wrote:

> On 11.02.22 13:51, Julien Rouhaud wrote:
> > > > I'm wondering why you changed this function to return an ObjectAddress rather
> > > > than an Oid? There's no event trigger support for ALTER DATABASE, and the rest
> > > > of similar utility commands also returns Oid.
> > >
> > > Hmm, I was looking at RenameDatabase() and AlterDatabaseOwner(), which
> > > return ObjectAddress.
> >
> > Apparently I managed to only check AlterDatabase and AlterDatabaseSet, which
> > both return an Oid. Maybe we could also update those two to also return an
> > ObjectAddress, for consistency?

> I didn't address the above issue. I looked at it a bit, but I also found
> other (non-database) object types that had a mix of different return types.
> It's not clear to me what this is all supposed to mean. If no one is
> checking the return, they should really all be turned into void, IMO. Maybe
> this should be a separate discussion.

IIRC we changed the return types of all DDL back when we were doing the
event triggers work (first to OIDs and then to ObjectAddress), but we
didn't realize at the time that shared objects such as databases etc
were not going to be supported by event triggers. So those particular
changes were for naught, but we never reverted them.

Maybe it's OK to have all the functions supporting databases and
tablespaces return void.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
<inflex> really, I see PHP as like a strange amalgamation of C, Perl, Shell
<crab> inflex: you know that "amalgam" means "mixture with mercury",
more or less, right?
<crab> i.e., "deadly poison"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-03-31 09:21:54 Re: Handle infinite recursion in logical replication setup
Previous Message Ronan Dunklau 2022-03-31 08:02:54 Re: ORDER BY pushdowns seem broken in postgres_fdw