some namespace.c refactoring

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема some namespace.c refactoring
Дата
Msg-id 12f1b1d2-f8cf-c4a2-72ec-441bd79546cb@enterprisedb.com
обсуждение исходный текст
Ответы Re: some namespace.c refactoring  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: some namespace.c refactoring  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
Here are two patches that refactor the mostly repetitive "${object} is 
visible" and get_${object}_oid() functions in namespace.c.  This uses 
the functions in objectaddress.c to look up the appropriate per-catalog 
system caches and attribute numbers, similar to other refactoring 
patches I have posted recently.

In both cases, there are some functions that have special behaviors that 
are not easy to unify, so I left those alone for now.

Notes on 0001-Refactor-is-visible-functions.patch:

Among the functions that are being unified, some check temp schemas and 
some skip them.  I suppose that this is because some (most) object types 
cannot normally be in temp schemas, but this isn't made explicit in the 
code.  I added a code comment about this, the way I understand it.

That said, you can create objects explicitly in temp schemas, so I'm not 
sure the existing code is completely correct.

Notes on 0002-Refactor-common-parts-of-get_-_oid-functions.patch:

Here, I only extracted the common parts of each function but left the 
actual functions alone, because they each have to produce their own 
error message.  There is a possibility to generalize this further, 
perhaps in the style of does_not_exist_skipping(), but that looked like 
a separate step to me.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: appendBinaryStringInfo stuff
Следующее
От: Pradeep Kumar
Дата:
Сообщение: Extensible Rmgr for Table Ams