This repository was archived by the owner on Sep 27, 2019. It is now read-only.
  
  
  
  
  
Description
Our catalog code is a mess. It's inconsistent. We need to clean it up so that it is easier to understand and follows the proper logical hierarchy.
I propose the following changes:
- 
Refactor the methods so that TransactionContextis always passed in as the first argument.
 
- 
Refactor the Catalogmethods so that parameters are passed in using the same order as the hierarchy (i.e., Database→Schema→Table). I think that Indexes should be under Table as well. Right now they are under Databases.
 
- 
DatabaseCatalogObjectshould not allow you to getTableCatalogObject.DatabaseCatalogObjectshould only allow you to getSchemaCatalogObjectand then all of the tables should be stored inSchemaCatalogObjectinstead.
 
- 
A more controversial move would be to rename SchemaCatalogObjecttoNamespaceCatalogObject. Postgres exposes this aspg_namespace. I think we should switch.