Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Clean-up Catalog Infrastructure #1398

Open
@apavlo

Description

@apavlo

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:

  1. Refactor the methods so that TransactionContext is always passed in as the first argument.

  2. Refactor the Catalog methods 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.

  3. DatabaseCatalogObject should not allow you to get TableCatalogObject. DatabaseCatalogObject should only allow you to get SchemaCatalogObject and then all of the tables should be stored in SchemaCatalogObject instead.

  4. A more controversial move would be to rename SchemaCatalogObject to NamespaceCatalogObject. Postgres exposes this as pg_namespace. I think we should switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions