espelhamento de git://git.postgresql.org/git/postgresql.git
89e5ef7e21
ObjectClass is an enum whose values correspond to catalog OIDs. But the extra layer of redirection, which is used only in small parts of the code, and the similarity to ObjectType, are confusing and cumbersome. One advantage has been that some switches processing the OCLASS enum don't have "default:" cases. This is so that the compiler tells us when we fail to add support for some new object class. But you can also handle that with some assertions and proper test coverage. It's not even clear how strong this benefit is. For example, in AlterObjectNamespace_oid(), you could still put a new OCLASS into the "ignore object types that don't have schema-qualified names" case, and it might or might not be wrong. Also, there are already various OCLASS switches that do have a default case, so it's not even clear what the preferred coding style should be. Reviewed-by: jian he <jian.universality@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/CAGECzQT3caUbcCcszNewCCmMbCuyP7XNAm60J3ybd6PN5kH2Dw%40mail.gmail.com |
||
---|---|---|
.. | ||
ci | ||
editors | ||
ifaddrs | ||
perlcheck | ||
pg_bsd_indent | ||
pginclude | ||
pgindent | ||
PerfectHash.pm | ||
RELEASE_CHANGES | ||
ccsym | ||
check_bison_recursion.pl | ||
codelines | ||
copyright.pl | ||
darwin_sysroot | ||
find_badmacros | ||
find_meson | ||
find_static | ||
find_typedef | ||
fix-old-flex-code.pl | ||
gen_export.pl | ||
gen_keywordlist.pl | ||
git-external-diff | ||
git_changelog | ||
install_files | ||
make_ctags | ||
make_etags | ||
make_mkid | ||
mark_pgdllimport.pl | ||
msvc_gendef.pl | ||
pgflex | ||
pgtest | ||
rcgen | ||
testint128.c | ||
testwrap | ||
valgrind.supp | ||
version_stamp.pl | ||
win32tzlist.pl |