CSV to POSTGRESQL COPY superuser error, using STDIN instead ?
- Dominant language
- Python
- Stars
- 1k
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
Hi, i want to copy a csv file to postgresql database, but i have this error due to permission on postgresql server. I cannot have SUPERUSER permission on this shared hosting.
I see on stackoverflow it's possible to bypass using STDIN and not file reading. This option also exist into odo ?
```
psycopg2.ProgrammingError: must be superuser to COPY to or from a file
HINT: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
```
```
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) must be superuser to COPY to or from a file
HINT: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating odo's PostgreSQL import path and the code that issues COPY through psycopg2 or SQLAlchemy. Check how input files are currently passed to PostgreSQL, then verify that a non-superuser import can use STDIN and that the CSV data loads successfully without the reported permission error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python, sqlalchemy
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100