Skip to content

Commit

Permalink
version 0.1-6
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel authored and gaborcsardi committed Oct 19, 2009
1 parent 8f6ee8c commit ce042ce
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 27 deletions.
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Package: RPostgreSQL
Version: 0.1-5
Date: $Date: 2009-10-13 19:34:13 -0500 (Tue, 13 Oct 2009) $
Version: 0.1-6
Date: $Date: 2009-10-19 16:04:18 -0500 (Mon, 19 Oct 2009) $
Title: R interface to the PostgreSQL database system
Author: Sameer Kumar Prayaga <sameer.bits@gmail.com> with mentor Dirk
Eddelbuettel <edd@debian.org>
Author: Sameer Kumar Prayaga (during 2008) and Dirk Eddelbuettel with
contributions by Neil Tiffin and Joe Conway
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Description: Database interface and PostgreSQL driver for R This
version complies with the database interface definition as
Expand All @@ -13,6 +13,6 @@ Depends: R (>= 2.9.0), methods, DBI (>= 0.1-4)
License: GPL-2
URL: http://www.stat.bell-labs.com/RS-DBI, http://www.postgresql.org
Collate: S4R.R zzz.R PostgreSQLSupport.R dbObjectId.R PostgreSQL.R
Packaged: 2009-10-14 00:38:42 UTC; edd
Packaged: 2009-10-19 21:05:44 UTC; edd
Repository: CRAN
Date/Publication: 2009-10-14 09:33:43
Date/Publication: 2009-10-20 06:56:34
6 changes: 3 additions & 3 deletions R/PostgreSQL.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## PostgreSQL.R
## Last Modified: $Date: 2009-10-09 19:46:41 -0500 (Fri, 09 Oct 2009) $
## Last Modified: $Date: 2009-10-16 12:50:09 -0500 (Fri, 16 Oct 2009) $

## This package was developed as a part of Summer of Code program organized by Google.
## Thanks to David A. James & Saikat DebRoy, the authors of RMySQL package.
Expand Down Expand Up @@ -138,8 +138,8 @@ setMethod("summary", "PostgreSQLConnection",
setMethod("dbListTables", "PostgreSQLConnection",
def = function(conn, ...){
out <- dbGetQuery(conn,
"select tablename from pg_tables where schemaname !='information_schema' ",
"and schemaname !='pg_catalog'", ...)
paste("select tablename from pg_tables where schemaname !='information_schema'",
"and schemaname !='pg_catalog'", ...))
if (is.null(out) || nrow(out) == 0)
out <- character(0)
else
Expand Down
22 changes: 22 additions & 0 deletions inst/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
2009-10-19 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION: CRAN release 0.1-6

* tests/connectWithNull.R: allow for port to be passed via an env. var.
* tests/dataTypeTests.R: idem
* tests/datetimeTests.R: idem
* tests/dbExistsIssue.R: idem
* tests/dbWriteTableTest.R: idem
* tests/loadDriverAndConnect.R: idem
* tests/selectWhereZero.R: idem
* tests/selectWithAlias.R: idem

2009-10-16 Dirk Eddelbuettel <edd@debian.org>

* R/PostgreSQL.R: Add missing paste() with thanks to João G.

2009-10-14 Dirk Eddelbuettel <edd@debian.org>

* tests/selectWhereZero.R: Fix upper/lower case table name

2009-10-13 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION: CRAN release 0.1-5
Expand All @@ -8,6 +29,7 @@
+ Lastly #7 cannot be replicated.

[ Neil Tiffin ]

* configure.in: Added standard OS X / Fink location

* src/RS-DBI.*: Consistent formatting via use of GNU indent
Expand Down
3 changes: 2 additions & 1 deletion tests/connectWithNull.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ if (Sys.getenv("POSTGRES_USER") != "" & Sys.getenv("POSTGRES_HOST") != "" & Sys.
user=Sys.getenv("POSTGRES_USER"),
password=Sys.getenv("POSTGRES_PASSWD"),
host=Sys.getenv("POSTGRES_HOST"),
dbname=Sys.getenv("POSTGRES_DATABASE"))
dbname=Sys.getenv("POSTGRES_DATABASE"),
port=ifelse((p<-Sys.getenv("POSTGRES_PORT"))!="", p, 5432))

## do we get here?
print(con)
Expand Down
3 changes: 2 additions & 1 deletion tests/dataTypeTests.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ if ((Sys.getenv("POSTGRES_USER") != "") &
user=Sys.getenv("POSTGRES_USER"),
password=Sys.getenv("POSTGRES_PASSWD"),
host=Sys.getenv("POSTGRES_HOST"),
dbname=Sys.getenv("POSTGRES_DATABASE"))
dbname=Sys.getenv("POSTGRES_DATABASE"),
port=ifelse((p<-Sys.getenv("POSTGRES_PORT"))!="", p, 5432))

if (dbExistsTable(con, "tempostgrestable"))
dbRemoveTable(con, "tempostgrestable")
Expand Down
3 changes: 2 additions & 1 deletion tests/datetimeTests.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ if ((Sys.getenv("POSTGRES_USER") != "") &
user=Sys.getenv("POSTGRES_USER"),
password=Sys.getenv("POSTGRES_PASSWD"),
host=Sys.getenv("POSTGRES_HOST"),
dbname=Sys.getenv("POSTGRES_DATABASE"))
dbname=Sys.getenv("POSTGRES_DATABASE"),
port=ifelse((p<-Sys.getenv("POSTGRES_PORT"))!="", p, 5432))

dbTypeTests(con, "timestamp")
dbTypeTests(con, "timestamp with time zone")
Expand Down
4 changes: 2 additions & 2 deletions tests/dbExistsIssue.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ if (Sys.getenv("POSTGRES_USER") != "" & Sys.getenv("POSTGRES_HOST") != "" & Sys.
user=Sys.getenv("POSTGRES_USER"),
password=Sys.getenv("POSTGRES_PASSWD"),
host=Sys.getenv("POSTGRES_HOST"),
dbname=Sys.getenv("POSTGRES_DATABASE"))

dbname=Sys.getenv("POSTGRES_DATABASE"),
port=ifelse((p<-Sys.getenv("POSTGRES_PORT"))!="", p, 5432))

if (dbExistsTable(con, "rockdata")) {
print("Removing rockdata\n")
Expand Down
3 changes: 2 additions & 1 deletion tests/dbWriteTableTest.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ if (Sys.getenv("POSTGRES_USER") != "" & Sys.getenv("POSTGRES_HOST") != "" & Sys.
user=Sys.getenv("POSTGRES_USER"),
password=Sys.getenv("POSTGRES_PASSWD"),
host=Sys.getenv("POSTGRES_HOST"),
dbname=Sys.getenv("POSTGRES_DATABASE"))
dbname=Sys.getenv("POSTGRES_DATABASE"),
port=ifelse((p<-Sys.getenv("POSTGRES_PORT"))!="", p, 5432))


if (dbExistsTable(con, "rockdata")) {
Expand Down
3 changes: 2 additions & 1 deletion tests/loadDriverAndConnect.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ if (Sys.getenv("POSTGRES_USER") != "" & Sys.getenv("POSTGRES_HOST") != "" & Sys.
user=Sys.getenv("POSTGRES_USER"),
password=Sys.getenv("POSTGRES_PASSWD"),
host=Sys.getenv("POSTGRES_HOST"),
dbname=Sys.getenv("POSTGRES_DATABASE"))
dbname=Sys.getenv("POSTGRES_DATABASE"),
port=ifelse((p<-Sys.getenv("POSTGRES_PORT"))!="", p, 5432))

## run a simple query and show the query result
res <- dbGetQuery(con, paste("select datname,encoding,datallowconn from pg_database",
Expand Down
19 changes: 10 additions & 9 deletions tests/selectWhereZero.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,25 @@ if (Sys.getenv("POSTGRES_USER") != "" & Sys.getenv("POSTGRES_HOST") != "" & Sys.
user=Sys.getenv("POSTGRES_USER"),
password=Sys.getenv("POSTGRES_PASSWD"),
host=Sys.getenv("POSTGRES_HOST"),
dbname=Sys.getenv("POSTGRES_DATABASE"))
dbname=Sys.getenv("POSTGRES_DATABASE"),
port=ifelse((p<-Sys.getenv("POSTGRES_PORT"))!="", p, 5432))


if (dbExistsTable(con, "tmpIrisData")) {
print("Removing tmpIrisData\n")
dbRemoveTable(con, "tmpIrisData")
if (dbExistsTable(con, "tmpirisdata")) {
print("Removing tmpirisdata\n")
dbRemoveTable(con, "tmpirisdata")
}

dbWriteTable(con, "tmpIrisData", iris)
dbWriteTable(con, "tmpirisdata", iris)

## run a simple query and show the query result
res <- dbGetQuery(con, "select * from tmpIrisData where Species=0")
res <- dbGetQuery(con, "select * from tmpirisdata where Species=0")
print(res)

## cleanup
if (dbExistsTable(con, "tmpIrisData")) {
print("Removing tmpIrisData\n")
dbRemoveTable(con, "tmpIrisData")
if (dbExistsTable(con, "tmpirisdata")) {
print("Removing tmpirisdata\n")
dbRemoveTable(con, "tmpirisdata")
}

## and disconnect
Expand Down
4 changes: 2 additions & 2 deletions tests/selectWithAlias.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ if (Sys.getenv("POSTGRES_USER") != "" & Sys.getenv("POSTGRES_HOST") != "" & Sys.
user=Sys.getenv("POSTGRES_USER"),
password=Sys.getenv("POSTGRES_PASSWD"),
host=Sys.getenv("POSTGRES_HOST"),
dbname=Sys.getenv("POSTGRES_DATABASE"))

dbname=Sys.getenv("POSTGRES_DATABASE"),
port=ifelse((p<-Sys.getenv("POSTGRES_PORT"))!="", p, 5432))

if (dbExistsTable(con, "rockdata")) {
print("Removing rockdata\n")
Expand Down

0 comments on commit ce042ce

Please sign in to comment.