Skip to content

Allow user_sql_files to override dbcatalog.sql #141

Description

@Joeboy

Hi!

For a couple of reasons, the sql in sql/dbcatalog.sql is causing us problems:

  1. pg_temp doesn't work on AWS Aurora
  2. Our Aurora database is unfortunately still on postgress 11, and the sql fails with an error there

It looks like we could nearly work around those issues by passing custom user_sql_files into connect_to_db(). But, we still have the problem of dbcatalog.sql erroring out. It seems that the only way to prevent that is to override connect_to_db() and connection_factory, removing the lines that run the sql from the latter class. Which seems quite messy.

Maybe it'd be neater if user_sql_files ran instead of dbcatalog.sql, not before it? If somebody just wants the default + their custom sql, it's easy enough to include tipg.database.DB_CATALOG_FILE in the list. It'd also make it possible to choose the order the files run in. Or to skip inspecting the db and create the collection catalog in some other way.

What do you think? If I did a PR what'd be the chances it'd be accepted?

Activity

  1. locked and limited conversation to collaborators on Nov 17, 2023
  2. converted this issue into a discussion #142 on Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions