rpostgis icon indicating copy to clipboard operation
rpostgis copied to clipboard

pgGetGeom() other.cols = TRUE by default restarts session

Open CrimarHer opened this issue 3 years ago • 1 comments
trafficstars

Hi,

R version 4.1.2 (2021-11-01) -- "Bird Hippie" rpostgis_1.4.3 RPostgreSQL_0.7-3 DBI_1.1.2

pgGetGeom has other.cols = T by default and when you use the fucntion without the argument other.cols it restarts my R session instead of throwing an error.

` #this works pgGetGeom(con, query=paste0("QUERY HERE "), other.cols=c("col1","col2", "col3")) pgGetGeom(con, query=paste0("QUERY HERE "), other.cols=F)

#this doesn't work and terminates R session pgGetGeom(con, query=paste0("QUERY HERE ")) ` This didn't happen with previous versions

Thanks!

CrimarHer avatar Feb 25 '22 13:02 CrimarHer

Hi @CrimarHer! Thanks for reporting. Unfortunately, rpostgis is not actively developed anymore, and I worry that we won't have the resources to check into this bug, which is a pity. I'll leave the issue open though, and add a note on my to-do list, but I'm not very optimistic about it.

This said, now that the sf package has achieved maturity, I can only advise you to have a look there. You should be able to import pretty much anything from a PostGIS database into R, in a very simple way with sf::st_read. Check for instance this blog post for more details on how to get things working. Hope this helps!

basille avatar Mar 03 '22 15:03 basille