Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions RPostgreSQL/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: RPostgreSQL
Version: 0.6-2
Date: 2017-06-24
Version: 0.6-3
Date: 2017-09-13
Title: R Interface to the 'PostgreSQL' Database System
Author: Joe Conway, Dirk Eddelbuettel, Tomoaki Nishiyama, Sameer Kumar Prayaga (during 2008), Neil Tiffin
Author: Joe Conway, Dirk Eddelbuettel, Tomoaki Nishiyama, Sameer Kumar Prayaga (during 2008), Neil Tiffin, Murat Tasan
Maintainer: Tomoaki Nishiyama <tomoakin@staff.kanazawa-u.ac.jp>
Description: Database interface and 'PostgreSQL' driver for 'R'.
This package provides a Database Interface 'DBI' compliant
Expand Down
13 changes: 6 additions & 7 deletions RPostgreSQL/R/PostgreSQLSupport.R
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ postgresqlQuickSQL <- function(con, statement, ...) {
if (length(rsList)>0){ # clear results
dbClearResult(rsList[[1]])
}
rs <- try(dbSendQuery(con, statement, ...))
if (inherits(rs, ErrorClass)){
warning("Could not create execute: ", statement)
return(NULL)
}

## Let dbSendQuery raise an error if it cannot execute statement.
## (Surrounding code should be responsible for handling errors.)
rs <- dbSendQuery(con, statement, ...)

if(dbHasCompleted(rs)){
dbClearResult(rs) ## no records to fetch, we're done
invisible()
Expand Down Expand Up @@ -421,8 +421,7 @@ postgresqlFetch <- function(res, n=0, ...) {
n <- as(n, "integer")
rsId <- as(res, "integer")
rel <- .Call(RS_PostgreSQL_fetch, rsId, nrec = n)
if(length(rel)==0 || length(rel[[1]])==0)
return(NULL)

## create running row index as of previous fetch (if any)
cnt <- dbGetRowCount(res)
nrec <- length(rel[[1]])
Expand Down