Skip to content

Running metadata.reflect on my Aurora pgsql DB throws #11269

Discussion options

You must be logged in to vote

Sorry for the multiple replies. I've got somewhere with this, enough to have the query run, but I'm not sure if what I've done is optimal or even correct. Here are the changes I applied:

  1. Copied the following functions of sqlalchemy.dialects.postgresql.base into my own AuroraPostgresDataAPIDialect class: _constraint_query, _index_query and get_multi_indexes.
  2. In _constraint_query, I changed the following:
    sql.func.generate_subscripts(
        pg_catalog.pg_constraint.c.conkey, 1
    ).label("ord"),
    to
    sql.func.generate_subscripts(
        pg_catalog.pg_constraint.c.conkey, sql.cast(1, INTEGER)
    ).label("ord"),
  3. In _index_query , I applied the same cast in the generate_subscripts call, plus the followin…

Replies: 1 comment 26 replies

Comment options

You must be logged in to vote
26 replies
@CaselIT
Comment options

@mat100payette
Comment options

@mat100payette
Comment options

@mat100payette
Comment options

Answer selected by mat100payette
@CaselIT
Comment options

@mat100payette
Comment options

@CaselIT
Comment options

@mat100payette
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants