postgresql/src/include/commands
Peter Eisentraut 89e5ef7e21 Remove ObjectClass type
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
2024-03-26 10:08:56 +01:00
..
alter.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
async.h Improve performance of subsystems on top of SLRU 2024-02-28 17:05:31 +01:00
cluster.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
collationcmds.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
comment.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
conversioncmds.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
copy.h Rename COPY option from SAVE_ERROR_TO to ON_ERROR 2024-01-19 15:15:51 +02:00
copyfrom_internal.h Revert "Refactor CopyReadAttributes{CSV,Text}() to use a callback in COPY FROM" 2024-02-14 10:07:22 +09:00
createas.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
dbcommands.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
dbcommands_xlog.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
defrem.h Add temporal FOREIGN KEY contraints 2024-03-24 07:37:13 +01:00
discard.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
event_trigger.h Remove ObjectClass type 2024-03-26 10:08:56 +01:00
explain.h Improve support for ExplainOneQuery() hook 2024-03-11 08:40:40 +09:00
extension.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
lockcmds.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
matview.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
policy.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
portalcmds.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
prepare.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
proclang.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
progress.h Add progress reporting of skipped tuples during COPY FROM. 2024-01-25 10:57:41 +09:00
publicationcmds.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
schemacmds.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
seclabel.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
sequence.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
subscriptioncmds.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
tablecmds.h Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
tablespace.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
trigger.h Allow locking updated tuples in tuple_update() and tuple_delete() 2024-03-26 01:27:56 +02:00
typecmds.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
user.h Add new GUC createrole_self_grant. 2023-01-10 12:44:49 -05:00
vacuum.h Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
view.h Update copyright for 2024 2024-01-03 20:49:05 -05:00