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)


Reply via email to