GetNewObjectId question
От | Maciek Sakrejda |
---|---|
Тема | GetNewObjectId question |
Дата | |
Msg-id | CAOtHd0Ckbih7Ur7XeVyLAJ26VZOfTNcq9qV403bNF4uTGtAN+Q@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: GetNewObjectId question
|
Список | pgsql-hackers |
While browsing through varsup.c, I noticed this comment on GetNewObjectId: * Hence, this routine should generally not be used directly. The only direct * callers should be GetNewOidWithIndex() and GetNewRelFileNumber() in * catalog/catalog.c. But AddRoleMems in user.c appears to also call the function directly: /* get an OID for the new row and insert it */ objectId = GetNewObjectId(); new_record[Anum_pg_auth_members_oid - 1] = objectId; tuple = heap_form_tuple(pg_authmem_dsc, new_record, new_record_nulls); CatalogTupleInsert(pg_authmem_rel, tuple); I'm not sure if that call is right, but this seems inconsistent. Should that caller be using GetNewOidWithIndex instead? Or should the comment be updated? Thanks, Maciek
В списке pgsql-hackers по дате отправления: