Skip to content

Commit 2faf3fc

Browse files
author
Tomoaki Nishiyama
committed
for a NOTE not to compare class with string
1 parent f18b127 commit 2faf3fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RPostgreSQL/R/PostgreSQLSupport.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ postgresqlBuildTableDefinition <- function(dbObj, name, obj, field.types = NULL,
705705
postgresqlDataType <- function(obj, ...) {
706706
rs.class <- data.class(obj)
707707
if(rs.class=="numeric"){
708-
sql.type <- if(class(obj)=="integer") "integer" else "float8"
708+
sql.type <- if(is(obj,"integer")) "integer" else "float8"
709709
}
710710
else {
711711
sql.type <- switch(rs.class,

0 commit comments

Comments
 (0)