Questions tagged [rpostgres]

23 questions
0
votes
0 answers

Unable to fetch data using dbFetch when n=-1 in RStudio

I am using RPostgres packages to send data query from WRDS server in RStudio with the codes: library(RPostgres) wrds <- dbConnect(Postgres(), host='wrds-pgdata.wharton.upenn.edu', port=9737, …
Clay ZHAI
  • 33
  • 3
0
votes
0 answers

I cannot use the RPostgres package in my MacBook M1

I can install the package RPostgres in the RStudio app on my Macbook Air M1. However, when I tried running the example code below, I got the following message: library(DBI) con <- dbConnect(RPostgres::Postgres()) Error: could not connect to server:…
0
votes
0 answers

RPostgres error with locale encoding language issue

I am trying to connect a local PostgrelSQL database from Rstudio via the RPostgres package. con <- dbConnect(RPostgres::Postgres(), dbname="####", host="127.0.0.1", port=5432, user="postgre", password="####") it returns unreadable…
Yiwei Zhu
  • 25
  • 3
0
votes
1 answer

Using RPostgres, what should I use to "set role..." for the table I will write to a db?

I'm new to connecting to databases via R, and I am trying to find best practices to minimize errors and problems. I am uploading a table from R to a postgres database, and I need to set the permissions to a certain group that I know the name of. I'm…
Sam
  • 17
  • 4
0
votes
1 answer

Installing RPostgres Library in Jupyter Notebook on Google Cloud Platform

I am trying to install the RPostgres library in R but I am using JupyterLab on Google Cloud Platform. I have found several suggestions on github.com/r-dbi/RPostgres, but none of them include information when working with Google Cloud Notebooks. I…
rtob
  • 169
  • 3
  • 16
0
votes
1 answer

How to avoid making multiple connections to postgres database when accessing using R

I'm using the following code however it is creating multiple connections when calling the map function and they are not closing. As a result my rds database is getting flooded with connections. Is there any way to change this code to prevent so many…
MGJ-123
  • 614
  • 4
  • 19
0
votes
1 answer

Error in connecting to PostgreSQL in R using DBI connector

i am facing the following challenge, when i am trying to connect to the Rpostgresql using the DBI package i am getting the following error. Below is the code used for my…
-1
votes
1 answer

Geometry column is changed into unusable format if i use st_write(append=TRUE)

If i save a sf in r with st_write(con, "filename", append=TRUE) my geometry column is converted into a weird format (see picture), where i cannot use it anymore. If i use the option append=FALSE everything is fine. Did anyone face a similar issue…
Thomas231
  • 45
  • 1
  • 7
1
2