Re: Retail DDL

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Ziga <ziga(at)ljudmila(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Retail DDL
Date: 2025-08-16 12:59:42
Message-ID: 202508161259.fa4kr6ldmayt@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Ziga,

On 2025-Aug-14, Ziga wrote:

> Of particular note is using oids only (no classid) to specify objects. I
> used believe that oid are unique across a postgres database for catalog
> objects, but since postgres 14 this no longer the case, see:
> https://github.com/lacanoid/pgddl/issues/25 . I don't know if this is
> intentional or not. In practice, it does not hinder usage.

It's never been the case, actually --- with older versions, you only
needed to let the OID counter wrap around, and then it would be possible
to create (say) a function with the same OID as a table. Back then it
was unusual that OIDs would wrap around, and even then it's hard to be
so unlucky that the OID generator gives you the same value exactly when
it's time to create an object of a different type; but it's certainly
always been a possibility. So the idea of passing just an OID is
fundamentally bogus. The class-id (or some other way to identify which
type of object the user wants) must be mandatory, in order for the API
to be robust.

Regards

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"I dream about dreams about dreams", sang the nightingale
under the pale moon (Sandman)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2025-08-16 13:41:57 Re: Adding REPACK [concurrently]
Previous Message Álvaro Herrera 2025-08-16 12:52:30 Re: Retail DDL