MagicStack / MagicStack/asyncpg
UndefinedTableError: relation "pg_temp.session_vars" does not exist
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
I can successfully connect to a PostgreSQL database and execute queries against a database to view the data the tables contain.
However, when I try to execute an UPDATE, I get the following error:
```
UndefinedTableError: relation "pg_temp.session_vars" does not exist
```
I am creating a connection to the database by doing the following:
(nothing special)
```
conn = await asyncpg.connect(user='username',
password='password',
database='databasename',
host='localhost')
```
I was wondering what, if anything, you might be aware of that would resolve this issue. Might there be something additional I need to do when setting up the connection?
(I can connect to the database directly via the shell and issue UPDATE's without any problems.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the supplied asyncpg.connect example and reproduce the UPDATE against PostgreSQL, comparing it with the working shell session. Investigate the session-scoped pg_temp.session_vars reference and the difference between connection contexts; done means isolating whether the fault is in asyncpg or database-side setup and recording a reproducible fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100