mcfunley / mcfunley/pugsql

Infinite recursive loop in _visit_bindparam when using sqlalchemy has_table

Open
#30 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
777
Forks
31
PR merge metrics
No merged PRs in 30d

Description

After importing pugsql, calling sqlalchemy's has_table method causes an infinite recursive loop. This may happen when any BindParameter is used but I am not sure.

To reproduce:
-Import pugsql
-Create an MSSQL pyodbc sqlalchemy engine
-Call the dialects has_table method like this:

engine.dialect.has_table(engine, table, schema=schema)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the loop after importing pugsql with an MSSQL pyodbc SQLAlchemy engine, then call engine.dialect.has_table(engine, table, schema=schema). Trace the recursion through _visit_bindparam and determine the intended stopping point; done means has_table returns without recursing indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.