-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to write R object to Postgres large object #376
Comments
Thanks. Can you use |
I use
In order to bring the image to R, I use
But those functions only work on the server side, i.e., the file must be on the same server as PostgreSQL. Also, the user must be a superuser. It would be great if someone built an R package to work on the client side: client interfaces. |
There is a libpq function |
Added a PR that introduces the |
Cross-posted with https://stackoverflow.com/questions/70271590/read-write-postgres-large-objects-with-dbi-rpostgres
I'm trying to use the large object feature from Postgres https://www.postgresql.org/docs/10/largeobjects.html but I have a hard time wrapping my head around converting R object and writing them to the db.
Here is what I have tried so far:
# Getting the db docker run --rm --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5433:5432 postgres
Creation works :
But then I have a hard time figuring out how to write an R object to this large object.
For example, how would I write
mtcars
as a large object in Postgres using{DBI}
and{RPostgres}
?And then, how do I read it back again in R?
The text was updated successfully, but these errors were encountered: