|
@@ -7,14 +7,18 @@
|
|
|
#' @keywords ogr2ogr, postgis
|
|
#' @keywords ogr2ogr, postgis
|
|
|
#' @export
|
|
#' @export
|
|
|
#' @examples
|
|
#' @examples
|
|
|
-#' ## Not run:
|
|
|
|
|
-#' ##
|
|
|
|
|
-#' ## construct_ogr2ogr_PG_connect_str()
|
|
|
|
|
-#' ##
|
|
|
|
|
-#' ## End(**Not run**)
|
|
|
|
|
|
|
+#'
|
|
|
|
|
+#' \dontrun{
|
|
|
|
|
+#'
|
|
|
|
|
+#' conf <- ruut::get_config()
|
|
|
|
|
+#' construct_ogr2ogr_PG_connect_str(conf = conf)
|
|
|
|
|
+#'
|
|
|
|
|
+#' }
|
|
|
construct_ogr2ogr_PG_connect_str <- function(conf = NULL) {
|
|
construct_ogr2ogr_PG_connect_str <- function(conf = NULL) {
|
|
|
- if(is.null(conf)) conf <- ruut::get_config()
|
|
|
|
|
- PG <- sprintf("\"PG:dbname='%s' host=%s port=%d user='%s' password='%s' sslmode=%s\"",
|
|
|
|
|
- conf$dbname, conf$host, conf$port, conf$user, conf$password, conf$sslmode)
|
|
|
|
|
|
|
+ if (is.null(conf)) conf <- ruut::get_config()
|
|
|
|
|
+ PG <- sprintf(
|
|
|
|
|
+ "\"PG:dbname='%s' host=%s port=%d user='%s' password='%s' sslmode=%s active_schema=%s\" ",
|
|
|
|
|
+ conf$dbname, conf$host, conf$port, conf$user, conf$password, conf$sslmode, conf$schema
|
|
|
|
|
+ )
|
|
|
PG
|
|
PG
|
|
|
}
|
|
}
|