From cruckert @end|ng |rom un|-muen@ter@de Wed Oct 1 11:53:44 2008 From: cruckert @end|ng |rom un|-muen@ter@de (Christian Ruckert) Date: Wed, 01 Oct 2008 11:53:44 +0200 Subject: [R-sig-DB] Saving R-objects to a database Message-ID: <48E348A8.2010005@uni-muenster.de> Someone solved the problem of saving R-objects to a database or can give me an answer like "this is not possible at the moment"? All my attempts runned into problems with conversion between blob, raw and character representations. Saving the R-object to a file and then getting it into the db leads to similar problems. Is saving to the file system the only practicable solution? In my special case I'm using a MySQL database with RMySQL package, but suggestions for other combinations are welcome. Greetings, Christian Ruckert From @d@v|@2 @end|ng |rom m@||@n|h@gov Wed Oct 1 12:15:39 2008 From: @d@v|@2 @end|ng |rom m@||@n|h@gov (Sean Davis) Date: Wed, 1 Oct 2008 06:15:39 -0400 Subject: [R-sig-DB] Saving R-objects to a database In-Reply-To: <48E348A8.2010005@uni-muenster.de> References: <48E348A8.2010005@uni-muenster.de> Message-ID: <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> On Wed, Oct 1, 2008 at 5:53 AM, Christian Ruckert wrote: > Someone solved the problem of saving R-objects to a database or can give me > an answer like "this is not possible at the moment"? > > All my attempts runned into problems with conversion between blob, raw and > character representations. Saving the R-object to a file and then getting it > into the db leads to similar problems. Is saving to the file system the only > practicable solution? Look at the serialize function. You can serialize any R object which can be stored into the database of your choice. Give that a try and let us know with a code example if you have problems. Sean > In my special case I'm using a MySQL database with RMySQL package, but > suggestions for other combinations are welcome. > > Greetings, > Christian Ruckert > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > From cruckert @end|ng |rom un|-muen@ter@de Wed Oct 1 12:42:52 2008 From: cruckert @end|ng |rom un|-muen@ter@de (Christian Ruckert) Date: Wed, 01 Oct 2008 12:42:52 +0200 Subject: [R-sig-DB] Saving R-objects to a database In-Reply-To: <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> References: <48E348A8.2010005@uni-muenster.de> <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> Message-ID: <48E3542C.4080505@uni-muenster.de> >> Someone solved the problem of saving R-objects to a database or can give me >> an answer like "this is not possible at the moment"? >> >> All my attempts runned into problems with conversion between blob, raw and >> character representations. Saving the R-object to a file and then getting it >> into the db leads to similar problems. Is saving to the file system the only >> practicable solution? > > Look at the serialize function. You can serialize any R object which > can be stored into the database of your choice. Give that a try and > let us know with a code example if you have problems. This is what I posted on r-mailing list before: > ser = serialize(obj, NULL) > dbSendQuery(link, paste("insert into table values(1, '",ser,"')",sep='')) > > The field to save the object in the MySQL Database is of type blob. > > result = dbGetQuery(link,"select * from table where id=1") > > unser = unserialize(result[1,"object_column"], NULL) > Error in unserialize(result[1, "object_column"], NULL) : unknown input format > In addition: Warning message: > In unserialize(result[1, "object_column"], NULL) : > unserialize()from a character string is deprecated and will be withdrawn in R 2.8.0 Brian Ripley answered: "DBI needs to convert blobs to raw not character." So saving to the db works fine, but function dbGetQuery seems to convert the result to a character string. Can I avoid this convertion or is this a problem with DBI package and will it get fixed? From @d@v|@2 @end|ng |rom m@||@n|h@gov Wed Oct 1 13:16:59 2008 From: @d@v|@2 @end|ng |rom m@||@n|h@gov (Sean Davis) Date: Wed, 1 Oct 2008 07:16:59 -0400 Subject: [R-sig-DB] Saving R-objects to a database In-Reply-To: <48E3542C.4080505@uni-muenster.de> References: <48E348A8.2010005@uni-muenster.de> <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> <48E3542C.4080505@uni-muenster.de> Message-ID: <264855a00810010416q470c0465xa8fa65e77a048757@mail.gmail.com> On Wed, Oct 1, 2008 at 6:42 AM, Christian Ruckert wrote: >>> Someone solved the problem of saving R-objects to a database or can give >>> me >>> an answer like "this is not possible at the moment"? >>> >>> All my attempts runned into problems with conversion between blob, raw >>> and >>> character representations. Saving the R-object to a file and then getting >>> it >>> into the db leads to similar problems. Is saving to the file system the >>> only >>> practicable solution? >> >> Look at the serialize function. You can serialize any R object which >> can be stored into the database of your choice. Give that a try and >> let us know with a code example if you have problems. > > This is what I posted on r-mailing list before: > >> ser = serialize(obj, NULL) >> dbSendQuery(link, paste("insert into table values(1, '",ser,"')",sep='')) >> >> The field to save the object in the MySQL Database is of type blob. >> >> result = dbGetQuery(link,"select * from table where id=1") >> >> unser = unserialize(result[1,"object_column"], NULL) >> Error in unserialize(result[1, "object_column"], NULL) : unknown input >> format >> In addition: Warning message: >> In unserialize(result[1, "object_column"], NULL) : >> unserialize()from a character string is deprecated and will be withdrawn >> in R 2.8.0 > > Brian Ripley answered: > "DBI needs to convert blobs to raw not character." > > So saving to the db works fine, but function dbGetQuery seems to convert the > result to a character string. Can I avoid this convertion or is this a > problem with DBI package and will it get fixed? What happens if you serialize using "ascii=TRUE"? Then, you could probably save into a text field. Admittedly, I haven't tried this. Sean From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Wed Oct 1 14:54:08 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Wed, 1 Oct 2008 13:54:08 +0100 (BST) Subject: [R-sig-DB] Saving R-objects to a database In-Reply-To: <264855a00810010416q470c0465xa8fa65e77a048757@mail.gmail.com> References: <48E348A8.2010005@uni-muenster.de> <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> <48E3542C.4080505@uni-muenster.de> <264855a00810010416q470c0465xa8fa65e77a048757@mail.gmail.com> Message-ID: On Wed, 1 Oct 2008, Sean Davis wrote: > On Wed, Oct 1, 2008 at 6:42 AM, Christian Ruckert > wrote: >>>> Someone solved the problem of saving R-objects to a database or can give >>>> me >>>> an answer like "this is not possible at the moment"? >>>> >>>> All my attempts runned into problems with conversion between blob, raw >>>> and >>>> character representations. Saving the R-object to a file and then getting >>>> it >>>> into the db leads to similar problems. Is saving to the file system the >>>> only >>>> practicable solution? >>> >>> Look at the serialize function. You can serialize any R object which >>> can be stored into the database of your choice. Give that a try and >>> let us know with a code example if you have problems. >> >> This is what I posted on r-mailing list before: >> >>> ser = serialize(obj, NULL) >>> dbSendQuery(link, paste("insert into table values(1, '",ser,"')",sep='')) >>> >>> The field to save the object in the MySQL Database is of type blob. >>> >>> result = dbGetQuery(link,"select * from table where id=1") >>> >>> unser = unserialize(result[1,"object_column"], NULL) >>> Error in unserialize(result[1, "object_column"], NULL) : unknown input >>> format >>> In addition: Warning message: >>> In unserialize(result[1, "object_column"], NULL) : >>> unserialize()from a character string is deprecated and will be withdrawn >>> in R 2.8.0 >> >> Brian Ripley answered: >> "DBI needs to convert blobs to raw not character." >> >> So saving to the db works fine, but function dbGetQuery seems to convert the >> result to a character string. Can I avoid this convertion or is this a >> problem with DBI package and will it get fixed? > > What happens if you serialize using "ascii=TRUE"? Then, you could > probably save into a text field. Admittedly, I haven't tried this. The result is still a raw vector. You need to encode the raw vector as text before saving to the DBMS, and unencode after retrieval. AFAIK the problem referred to is specific to raw vectors and DBI, not general to all R-DBMS interfaces. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From @d@v|@2 @end|ng |rom m@||@n|h@gov Wed Oct 1 15:10:13 2008 From: @d@v|@2 @end|ng |rom m@||@n|h@gov (Sean Davis) Date: Wed, 1 Oct 2008 09:10:13 -0400 Subject: [R-sig-DB] Saving R-objects to a database In-Reply-To: References: <48E348A8.2010005@uni-muenster.de> <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> <48E3542C.4080505@uni-muenster.de> <264855a00810010416q470c0465xa8fa65e77a048757@mail.gmail.com> Message-ID: <264855a00810010610i78b1b834n7f6d2243ea04636b@mail.gmail.com> On Wed, Oct 1, 2008 at 8:54 AM, Prof Brian Ripley wrote: > On Wed, 1 Oct 2008, Sean Davis wrote: > >> On Wed, Oct 1, 2008 at 6:42 AM, Christian Ruckert >> wrote: >>>>> >>>>> Someone solved the problem of saving R-objects to a database or can >>>>> give >>>>> me >>>>> an answer like "this is not possible at the moment"? >>>>> >>>>> All my attempts runned into problems with conversion between blob, raw >>>>> and >>>>> character representations. Saving the R-object to a file and then >>>>> getting >>>>> it >>>>> into the db leads to similar problems. Is saving to the file system the >>>>> only >>>>> practicable solution? >>>> >>>> Look at the serialize function. You can serialize any R object which >>>> can be stored into the database of your choice. Give that a try and >>>> let us know with a code example if you have problems. >>> >>> This is what I posted on r-mailing list before: >>> >>>> ser = serialize(obj, NULL) >>>> dbSendQuery(link, paste("insert into table values(1, >>>> '",ser,"')",sep='')) >>>> >>>> The field to save the object in the MySQL Database is of type blob. >>>> >>>> result = dbGetQuery(link,"select * from table where id=1") >>>> >>>> unser = unserialize(result[1,"object_column"], NULL) >>>> Error in unserialize(result[1, "object_column"], NULL) : unknown input >>>> format >>>> In addition: Warning message: >>>> In unserialize(result[1, "object_column"], NULL) : >>>> unserialize()from a character string is deprecated and will be >>>> withdrawn >>>> in R 2.8.0 >>> >>> Brian Ripley answered: >>> "DBI needs to convert blobs to raw not character." >>> >>> So saving to the db works fine, but function dbGetQuery seems to convert >>> the >>> result to a character string. Can I avoid this convertion or is this a >>> problem with DBI package and will it get fixed? >> >> What happens if you serialize using "ascii=TRUE"? Then, you could >> probably save into a text field. Admittedly, I haven't tried this. > > The result is still a raw vector. You need to encode the raw vector as text > before saving to the DBMS, and unencode after retrieval. > > AFAIK the problem referred to is specific to raw vectors and DBI, not > general to all R-DBMS interfaces. Thanks for the clarification, again. Christian, it might be easier (and likely faster) to store the URI in the database and the object in Rda format on disk with a UUID as a file name. In the database world, I think the general consensus is that it is best not to store objects like this in the database as the overhead of backup, storage, retrieval, etc. are higher than storing on the file system. Sean Sean From cruckert @end|ng |rom un|-muen@ter@de Wed Oct 1 17:12:57 2008 From: cruckert @end|ng |rom un|-muen@ter@de (Christian Ruckert) Date: Wed, 01 Oct 2008 17:12:57 +0200 Subject: [R-sig-DB] Saving R-objects to a database In-Reply-To: <264855a00810010610i78b1b834n7f6d2243ea04636b@mail.gmail.com> References: <48E348A8.2010005@uni-muenster.de> <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> <48E3542C.4080505@uni-muenster.de> <264855a00810010416q470c0465xa8fa65e77a048757@mail.gmail.com> <264855a00810010610i78b1b834n7f6d2243ea04636b@mail.gmail.com> Message-ID: <48E39379.1060307@uni-muenster.de> Sean Davis schrieb: > On Wed, Oct 1, 2008 at 8:54 AM, Prof Brian Ripley wrote: >> On Wed, 1 Oct 2008, Sean Davis wrote: >> >>> On Wed, Oct 1, 2008 at 6:42 AM, Christian Ruckert >>> wrote: >>>>>> Someone solved the problem of saving R-objects to a database or can >>>>>> give >>>>>> me >>>>>> an answer like "this is not possible at the moment"? >>>>>> >>>>>> All my attempts runned into problems with conversion between blob, raw >>>>>> and >>>>>> character representations. Saving the R-object to a file and then >>>>>> getting >>>>>> it >>>>>> into the db leads to similar problems. Is saving to the file system the >>>>>> only >>>>>> practicable solution? >>>>> Look at the serialize function. You can serialize any R object which >>>>> can be stored into the database of your choice. Give that a try and >>>>> let us know with a code example if you have problems. >>>> This is what I posted on r-mailing list before: >>>> >>>>> ser = serialize(obj, NULL) >>>>> dbSendQuery(link, paste("insert into table values(1, >>>>> '",ser,"')",sep='')) >>>>> >>>>> The field to save the object in the MySQL Database is of type blob. >>>>> >>>>> result = dbGetQuery(link,"select * from table where id=1") >>>>> >>>>> unser = unserialize(result[1,"object_column"], NULL) >>>>> Error in unserialize(result[1, "object_column"], NULL) : unknown input >>>>> format >>>>> In addition: Warning message: >>>>> In unserialize(result[1, "object_column"], NULL) : >>>>> unserialize()from a character string is deprecated and will be >>>>> withdrawn >>>>> in R 2.8.0 >>>> Brian Ripley answered: >>>> "DBI needs to convert blobs to raw not character." >>>> >>>> So saving to the db works fine, but function dbGetQuery seems to convert >>>> the >>>> result to a character string. Can I avoid this convertion or is this a >>>> problem with DBI package and will it get fixed? >>> What happens if you serialize using "ascii=TRUE"? Then, you could >>> probably save into a text field. Admittedly, I haven't tried this. >> The result is still a raw vector. You need to encode the raw vector as text >> before saving to the DBMS, and unencode after retrieval. >> >> AFAIK the problem referred to is specific to raw vectors and DBI, not >> general to all R-DBMS interfaces. > > Thanks for the clarification, again. > > Christian, it might be easier (and likely faster) to store the URI in > the database and the object in Rda format on disk with a UUID as a > file name. In the database world, I think the general consensus is > that it is best not to store objects like this in the database as the > overhead of backup, storage, retrieval, etc. are higher than storing > on the file system. > > Sean > > Sean (Un-)encode with rawToChar now worked for a small object, but for bigger objects the string is truncated. Thanks for your efforts, I've received an impression whats possible and what not. I think I'll give the file system solution a try. Christian From @d@m_pg@q| @end|ng |rom w|tneyweb@org Thu Oct 2 14:55:57 2008 From: @d@m_pg@q| @end|ng |rom w|tneyweb@org (adam_pgsql) Date: Thu, 2 Oct 2008 13:55:57 +0100 Subject: [R-sig-DB] Saving R-objects to a database In-Reply-To: <48E3542C.4080505@uni-muenster.de> References: <48E348A8.2010005@uni-muenster.de> <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> <48E3542C.4080505@uni-muenster.de> Message-ID: On 1 Oct 2008, at 11:42, Christian Ruckert wrote: >>> Someone solved the problem of saving R-objects to a database or >>> can give me >>> an answer like "this is not possible at the moment"? >>> >>> All my attempts runned into problems with conversion between blob, >>> raw and >>> character representations. Saving the R-object to a file and then >>> getting it >>> into the db leads to similar problems. Is saving to the file >>> system the only >>> practicable solution? >> Look at the serialize function. You can serialize any R object which >> can be stored into the database of your choice. Give that a try and >> let us know with a code example if you have problems. > > This is what I posted on r-mailing list before: > > > ser = serialize(obj, NULL) > > dbSendQuery(link, paste("insert into table values(1, > '",ser,"')",sep='')) > > > > The field to save the object in the MySQL Database is of type blob. > > > > result = dbGetQuery(link,"select * from table where id=1") > > > > unser = unserialize(result[1,"object_column"], NULL) > > Error in unserialize(result[1, "object_column"], NULL) : unknown > input format > > In addition: Warning message: > > In unserialize(result[1, "object_column"], NULL) : > > unserialize()from a character string is deprecated and will be > withdrawn in R 2.8.0 > > Brian Ripley answered: > "DBI needs to convert blobs to raw not character." > > So saving to the db works fine, but function dbGetQuery seems to > convert the result to a character string. Can I avoid this > convertion or is this a problem with DBI package and will it get > fixed? we have used something like this (these are snippets which will not work as is... but should give you a starting point) To Save: s_rdata <- if(is.null(rdata)) "" else serialize(rdata, connection=NULL, ascii=TRUE) if(class(s_rdata) == "raw") s_rdata <- rawToChar(s_rdata) sql <- paste("INSERT INTO my_table (dataset_id, rdata) ", "VALUES (", dataset_id, ", E'", s_rdata, "')", sep="") dbSendQuery(dbh, sql) To Load: sql <- paste("SELECT * FROM my_table WHERE dataset_id = ",dataset_id, sep="") dataset <- dbGetResult(dbSendQuery(dbh, sql)) for(n in 1:length(dataset$rdata_type)) { rdata_type <- dataset$rdata_type[n] s_rdata <- dataset$rdata[n] rdata <- if(nchar(s_rdata) > 0) unserialize(s_rdata) else NULL } (this was for use with PostgreSQL by the way, hence the E'' syntax above) HTH adam From hp@ge@ @end|ng |rom |hcrc@org Fri Oct 3 04:17:19 2008 From: hp@ge@ @end|ng |rom |hcrc@org (Herve Pages) Date: Thu, 02 Oct 2008 19:17:19 -0700 Subject: [R-sig-DB] Saving R-objects to a database In-Reply-To: <48E39379.1060307@uni-muenster.de> References: <48E348A8.2010005@uni-muenster.de> <264855a00810010315i158c740fi7a707c0fd9a90d61@mail.gmail.com> <48E3542C.4080505@uni-muenster.de> <264855a00810010416q470c0465xa8fa65e77a048757@mail.gmail.com> <264855a00810010610i78b1b834n7f6d2243ea04636b@mail.gmail.com> <48E39379.1060307@uni-muenster.de> Message-ID: <48E580AF.6000006@fhcrc.org> Hi Christian, Christian Ruckert wrote: [...] > > (Un-)encode with rawToChar now worked for a small object, but for bigger > objects the string is truncated. You need to serialize with ascii=TRUE otherwise you get a raw vector with lots of nul bytes that you won't be able to turn into a text without losing part of it: - rawToChar() will truncate the text at the first nul byte - intToUtf8(as.integer()) will silently ignore those nul bytes. This is because embedded nuls are not supported in character vectors anymore (which is a good thing). I'm not 100% sure but I think you won't get any nul bytes if you use serialize( , ascii=TRUE). Try this: objToText <- function(object) rawToChar(serialize(object, NULL, ascii=TRUE)) textToObj <- function(text) unserialize(charToRaw(text)) > x0 <- list(1, 2, 3) > objToText(x0) [1] "A\n2\n133120\n131840\n19\n3\n14\n1\n1\n14\n1\n2\n14\n1\n3\n" > textToObj(objToText(x0)) [[1]] [1] 1 [[2]] [1] 2 [[3]] [1] 3 I've not tried this on big objects though. Note that, despite serialize() man page claiming that ascii=FALSE will produce a more compact binary representation of the object, my experience turns out to be the opposite. Cheers, H. From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Fri Oct 17 13:42:49 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Fri, 17 Oct 2008 12:42:49 +0100 (BST) Subject: [R-sig-DB] [R] [R-pkgs] New package RPostgreSQL 0.1.0 In-Reply-To: <18677.22625.526067.785258@ron.nulle.part> References: <18677.22625.526067.785258@ron.nulle.part> Message-ID: Following up the Windows point on a specialized list (R-sig-db), I was able to get this to build with setenv PG_HOME D:/Program Files/PostgreSQL/8.3 and a src/Makevars.win containing PKG_CPPFLAGS=-I"$(PG_HOME)"/include PKG_LIBS=-L"$(PG_HOME)"/lib -lpq The problem is that you do need a fairly complete Windows install of PostgreSQL, and I had to go back and add the development files. Then you will need libpq.dll in your path: that is in (PG_HOME/bin). The tests/*.R did not work, but that's a permissions issue (as for me on Linux) and I needed to specify user="postgresql" and password="...". Then minimal tests worked suitably. I'll put a Windows binary on CRAN extras, at least for now. On Tue, 14 Oct 2008, Dirk Eddelbuettel wrote: > > RPostgreSQL version 0.1.0 > > We are pround to announce the availability of the RPostgreSQL package on CRAN > and its mirrors. This package provides an a DBI-compliant interface between > PostgreSQL and R. > > RPostgreSQL was developed as part of the Google Summer of Code 2008 program > by Sameer Kumar Prayaga. > > Some highlights: > > o Implemented all the DBI features > > o Added support for transaction management > > o Added type mapping for dates & timestamps > > Known bugs/deficiencies: > > o Building on Windows unknown/untested. Feedback welcome > > RPostgreSQL is hosted on Google Code, for more information see > > http://rpostgresql.googlecode.com/ > > For any suggestions and queries, please contact: > > Sameer Kumar Prayaga > Dirk Eddelbuettel > > -- > Three out of two people have difficulties with fractions. > > _______________________________________________ > R-packages mailing list > R-packages at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-packages > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From edd @end|ng |rom deb|@n@org Fri Oct 17 14:17:03 2008 From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel) Date: Fri, 17 Oct 2008 07:17:03 -0500 Subject: [R-sig-DB] [R] [R-pkgs] New package RPostgreSQL 0.1.0 In-Reply-To: References: <18677.22625.526067.785258@ron.nulle.part> Message-ID: <18680.33343.330123.562586@ron.nulle.part> On 17 October 2008 at 12:42, Prof Brian Ripley wrote: | Following up the Windows point on a specialized list (R-sig-db), I was | able to get this to build with | | setenv PG_HOME D:/Program Files/PostgreSQL/8.3 | | and a src/Makevars.win containing | | PKG_CPPFLAGS=-I"$(PG_HOME)"/include | PKG_LIBS=-L"$(PG_HOME)"/lib -lpq Thank you very much! I also learned from Jan that the simple (but too simple) configure.in that avoids pg_config (which somehow wasn't in the path on Sameer's FC machine) leads to malfunction on OS X, so I have to fix that too. Do your FC / RH system all have pg_config in the path ? | The problem is that you do need a fairly complete Windows install of | PostgreSQL, and I had to go back and add the development files. Right. I guess I need to document that. Exactly what file did you fetch? | Then you will need libpq.dll in your path: that is in (PG_HOME/bin). The | tests/*.R did not work, but that's a permissions issue (as for me on | Linux) and I needed to specify user="postgresql" and password="...". | Then minimal tests worked suitably. Because we cannot assume a Pg backend to be present and to be configured, we cannot run tests automagically. See inst/devTests in the sources, or devTests/ in the installed package for some more tests -- not the most refined set, but it grew as we grew the package. | I'll put a Windows binary on CRAN extras, at least for now. Many thanks for that, and thanks also for following up on r-sig-db! Dirk | On Tue, 14 Oct 2008, Dirk Eddelbuettel wrote: | | > | > RPostgreSQL version 0.1.0 | > | > We are pround to announce the availability of the RPostgreSQL package on CRAN | > and its mirrors. This package provides an a DBI-compliant interface between | > PostgreSQL and R. | > | > RPostgreSQL was developed as part of the Google Summer of Code 2008 program | > by Sameer Kumar Prayaga. | > | > Some highlights: | > | > o Implemented all the DBI features | > | > o Added support for transaction management | > | > o Added type mapping for dates & timestamps | > | > Known bugs/deficiencies: | > | > o Building on Windows unknown/untested. Feedback welcome | > | > RPostgreSQL is hosted on Google Code, for more information see | > | > http://rpostgresql.googlecode.com/ | > | > For any suggestions and queries, please contact: | > | > Sameer Kumar Prayaga | > Dirk Eddelbuettel | > | > -- | > Three out of two people have difficulties with fractions. | > | > _______________________________________________ | > R-packages mailing list | > R-packages at r-project.org | > https://stat.ethz.ch/mailman/listinfo/r-packages | > | > ______________________________________________ | > R-help at r-project.org mailing list | > https://stat.ethz.ch/mailman/listinfo/r-help | > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html | > and provide commented, minimal, self-contained, reproducible code. | > | | -- | Brian D. Ripley, ripley at stats.ox.ac.uk | Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ | University of Oxford, Tel: +44 1865 272861 (self) | 1 South Parks Road, +44 1865 272866 (PA) | Oxford OX1 3TG, UK Fax: +44 1865 272595 -- Three out of two people have difficulties with fractions. From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Fri Oct 17 14:44:58 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Fri, 17 Oct 2008 13:44:58 +0100 (BST) Subject: [R-sig-DB] [R] [R-pkgs] New package RPostgreSQL 0.1.0 In-Reply-To: <18680.33343.330123.562586@ron.nulle.part> References: <18677.22625.526067.785258@ron.nulle.part> <18680.33343.330123.562586@ron.nulle.part> Message-ID: On Fri, 17 Oct 2008, Dirk Eddelbuettel wrote: > On 17 October 2008 at 12:42, Prof Brian Ripley wrote: > | Following up the Windows point on a specialized list (R-sig-db), I was > | able to get this to build with > | > | setenv PG_HOME D:/Program Files/PostgreSQL/8.3 > | > | and a src/Makevars.win containing > | > | PKG_CPPFLAGS=-I"$(PG_HOME)"/include > | PKG_LIBS=-L"$(PG_HOME)"/lib -lpq > > Thank you very much! > > I also learned from Jan that the simple (but too simple) configure.in that > avoids pg_config (which somehow wasn't in the path on Sameer's FC machine) > leads to malfunction on OS X, so I have to fix that too. > > Do your FC / RH system all have pg_config in the path ? Those which have development files on. (We have some production PostgreSQL systems without it, since the CMS for our websites runs on PostgreSQL.) gannet% whereis pg_config pg_config: /usr/bin/pg_config /usr/include/pg_config.h /usr/share/man/man1/pg_config.1.gz gannet% rpm -q --whatprovides /usr/bin/pg_config postgresql-devel-8.2.10-1.fc8 so it is part of the -devel RPM as one might expect from RH. > | The problem is that you do need a fairly complete Windows install of > | PostgreSQL, and I had to go back and add the development files. > > Right. I guess I need to document that. Exactly what file did you fetch? It's part of the standard .msi installer, but you have to select non-default options, the Development group (only to do a source build of RPostgreSQL, as far as I can tell). It *should* be easy to go back and add those options, but on my box the installation path had been lost so I actually had to uninstall and reinstall. > | Then you will need libpq.dll in your path: that is in (PG_HOME/bin). The > | tests/*.R did not work, but that's a permissions issue (as for me on > | Linux) and I needed to specify user="postgresql" and password="...". > | Then minimal tests worked suitably. > > Because we cannot assume a Pg backend to be present and to be configured, we > cannot run tests automagically. Sure, but even if it is, a standard setup (even on Windows) will require both a user and a password (and the only user you can guarantee is present is "postgresql"). I was just warning people that failure is expected. > See inst/devTests in the sources, or > devTests/ in the installed package for some more tests -- not the most > refined set, but it grew as we grew the package. > > | I'll put a Windows binary on CRAN extras, at least for now. > > Many thanks for that, and thanks also for following up on r-sig-db! > > Dirk > > > | On Tue, 14 Oct 2008, Dirk Eddelbuettel wrote: > | > | > > | > RPostgreSQL version 0.1.0 > | > > | > We are pround to announce the availability of the RPostgreSQL package on CRAN > | > and its mirrors. This package provides an a DBI-compliant interface between > | > PostgreSQL and R. > | > > | > RPostgreSQL was developed as part of the Google Summer of Code 2008 program > | > by Sameer Kumar Prayaga. > | > > | > Some highlights: > | > > | > o Implemented all the DBI features > | > > | > o Added support for transaction management > | > > | > o Added type mapping for dates & timestamps > | > > | > Known bugs/deficiencies: > | > > | > o Building on Windows unknown/untested. Feedback welcome > | > > | > RPostgreSQL is hosted on Google Code, for more information see > | > > | > http://rpostgresql.googlecode.com/ > | > > | > For any suggestions and queries, please contact: > | > > | > Sameer Kumar Prayaga > | > Dirk Eddelbuettel > | > > | > -- > | > Three out of two people have difficulties with fractions. > | > > | > _______________________________________________ > | > R-packages mailing list > | > R-packages at r-project.org > | > https://stat.ethz.ch/mailman/listinfo/r-packages > | > > | > ______________________________________________ > | > R-help at r-project.org mailing list > | > https://stat.ethz.ch/mailman/listinfo/r-help > | > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > | > and provide commented, minimal, self-contained, reproducible code. > | > > | > | -- > | Brian D. Ripley, ripley at stats.ox.ac.uk > | Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > | University of Oxford, Tel: +44 1865 272861 (self) > | 1 South Parks Road, +44 1865 272866 (PA) > | Oxford OX1 3TG, UK Fax: +44 1865 272595 > > -- > Three out of two people have difficulties with fractions. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From bo @end|ng |rom u||@edu Fri Oct 17 22:20:23 2008 From: bo @end|ng |rom u||@edu (Bo Zhao) Date: Fri, 17 Oct 2008 16:20:23 -0400 Subject: [R-sig-DB] [R] [R-pkgs] New package RPostgreSQL 0.1.0 In-Reply-To: References: <18677.22625.526067.785258@ron.nulle.part> <18680.33343.330123.562586@ron.nulle.part> Message-ID: <4aad65740810171320n1fa1ba96kae1b269ecf0a4b92@mail.gmail.com> it is a exciting news that the RPostgreSQL 1.0 released. On Fri, Oct 17, 2008 at 8:44 AM, Prof Brian Ripley wrote: > On Fri, 17 Oct 2008, Dirk Eddelbuettel wrote: > >> On 17 October 2008 at 12:42, Prof Brian Ripley wrote: >> | Following up the Windows point on a specialized list (R-sig-db), I was >> | able to get this to build with >> | >> | setenv PG_HOME D:/Program Files/PostgreSQL/8.3 >> | >> | and a src/Makevars.win containing >> | >> | PKG_CPPFLAGS=-I"$(PG_HOME)"/include >> | PKG_LIBS=-L"$(PG_HOME)"/lib -lpq >> >> Thank you very much! >> >> I also learned from Jan that the simple (but too simple) configure.in that >> avoids pg_config (which somehow wasn't in the path on Sameer's FC machine) >> leads to malfunction on OS X, so I have to fix that too. >> >> Do your FC / RH system all have pg_config in the path ? > > Those which have development files on. (We have some production PostgreSQL > systems without it, since the CMS for our websites runs on PostgreSQL.) > > gannet% whereis pg_config > pg_config: /usr/bin/pg_config /usr/include/pg_config.h > /usr/share/man/man1/pg_config.1.gz > gannet% rpm -q --whatprovides /usr/bin/pg_config > postgresql-devel-8.2.10-1.fc8 > > so it is part of the -devel RPM as one might expect from RH. > >> | The problem is that you do need a fairly complete Windows install of >> | PostgreSQL, and I had to go back and add the development files. >> >> Right. I guess I need to document that. Exactly what file did you fetch? > > It's part of the standard .msi installer, but you have to select non-default > options, the Development group (only to do a source build of RPostgreSQL, as > far as I can tell). It *should* be easy to go back and add those options, > but on my box the installation path had been lost so I actually had to > uninstall and reinstall. > >> | Then you will need libpq.dll in your path: that is in (PG_HOME/bin). The >> | tests/*.R did not work, but that's a permissions issue (as for me on >> | Linux) and I needed to specify user="postgresql" and password="...". >> | Then minimal tests worked suitably. >> >> Because we cannot assume a Pg backend to be present and to be configured, >> we >> cannot run tests automagically. > > Sure, but even if it is, a standard setup (even on Windows) will require > both a user and a password (and the only user you can guarantee is present > is "postgresql"). I was just warning people that failure is expected. > >> See inst/devTests in the sources, or >> devTests/ in the installed package for some more tests -- not the most >> refined set, but it grew as we grew the package. >> >> | I'll put a Windows binary on CRAN extras, at least for now. >> >> Many thanks for that, and thanks also for following up on r-sig-db! >> >> Dirk >> >> >> | On Tue, 14 Oct 2008, Dirk Eddelbuettel wrote: >> | >> | > >> | > RPostgreSQL version 0.1.0 >> | > >> | > We are pround to announce the availability of the RPostgreSQL package >> on CRAN >> | > and its mirrors. This package provides an a DBI-compliant interface >> between >> | > PostgreSQL and R. >> | > >> | > RPostgreSQL was developed as part of the Google Summer of Code 2008 >> program >> | > by Sameer Kumar Prayaga. >> | > >> | > Some highlights: >> | > >> | > o Implemented all the DBI features >> | > >> | > o Added support for transaction management >> | > >> | > o Added type mapping for dates & timestamps >> | > >> | > Known bugs/deficiencies: >> | > >> | > o Building on Windows unknown/untested. Feedback welcome >> | > >> | > RPostgreSQL is hosted on Google Code, for more information see >> | > >> | > http://rpostgresql.googlecode.com/ >> | > >> | > For any suggestions and queries, please contact: >> | > >> | > Sameer Kumar Prayaga >> | > Dirk Eddelbuettel >> | > >> | > -- >> | > Three out of two people have difficulties with fractions. >> | > >> | > _______________________________________________ >> | > R-packages mailing list >> | > R-packages at r-project.org >> | > https://stat.ethz.ch/mailman/listinfo/r-packages >> | > >> | > ______________________________________________ >> | > R-help at r-project.org mailing list >> | > https://stat.ethz.ch/mailman/listinfo/r-help >> | > PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> | > and provide commented, minimal, self-contained, reproducible code. >> | > >> | >> | -- >> | Brian D. Ripley, ripley at stats.ox.ac.uk >> | Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> | University of Oxford, Tel: +44 1865 272861 (self) >> | 1 South Parks Road, +44 1865 272866 (PA) >> | Oxford OX1 3TG, UK Fax: +44 1865 272595 >> >> -- >> Three out of two people have difficulties with fractions. >> > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > -- Bo, Zhao Dept. of Urban & Regional Planning University of Florida. Mobile: +1-352-235-5029 Email: bo at ufl.edu Site: http://www.geoinformatics.cn Coordinates: 29?37'42"N 82?22'27"W This information is protected by FERPA and cannot be re-disclosed From DH||| @end|ng |rom h@g|n|m@com Mon Oct 20 18:16:01 2008 From: DH||| @end|ng |rom h@g|n|m@com (Doug Hill) Date: Mon, 20 Oct 2008 09:16:01 -0700 Subject: [R-sig-DB] Long query time running R + RODBC against SQL Server Message-ID: Hi, all. I'm using RODBC to query a SQL Server 2005 database, and am experiencing very slow performance. I assume I'm doing something wrong, but I'm not doing anything fancy, so I'm stumped. My setup: Core 2 Duo 2GHz, Win XP, 2GB RAM R 2.7.1 RODBC (latest from CRAN, not sure the version - how to tell?) SQL Server 2005 MS Access 2003 SQL Native Client ODBC driver (DSN = "HIM") SQL Server ODBC driver (DSN = "HIMs") MS Access ODBC driver (DSN = "HIMa") Table being queried has ~290K rows, of which the query being run should return ~78K. Table being queried has 142 columns, of which all but 5 are type float. The other 5 are nvarchar(255) . No indices, keys, or joins - one flat table No UPDATEs, INSERTs, just a SELECT R code looks like this: him <- odbcConnect("HIM", "CDCS", "*****") FAC <- sqlQuery(him, "Select * from T304 where f133=1") If I use either SQL Server DSN, the query seems to hang, though I can see in Task Manager that Rgui.exe grows up to point, and uses most of one CPU. I killed R after waiting 13+ minutes. If I use sqlFetch() instead and specify max records as 1000, this does return but only after ~2 minutes. I have tried both these calls with believeNRows=FALSE, with the same result. In SQL Server itself, the same query completes after ~10 seconds. If I use the Access DSN in my R code above, the query takes 12-15s. It's the same data in Access, in fact it was imported into SQL Server 2005 from the Access DB. Any ideas how a query against SQL Server could be that much slower than against Access? I understand there are conversions performed for the 5 non-float columns, but I believe that would be true in the Access case as well. Any troubleshooting ideas? Thanks! Doug Internal Virus Database is out-of-date. Checked by AVG. 7:50 AM [[alternative HTML version deleted]] From @p|uque @end|ng |rom gm@||@com Tue Oct 21 20:45:57 2008 From: @p|uque @end|ng |rom gm@||@com (Sebastian P. Luque) Date: Tue, 21 Oct 2008 13:45:57 -0500 Subject: [R-sig-DB] [R] [R-pkgs] New package RPostgreSQL 0.1.0 References: <18677.22625.526067.785258@ron.nulle.part> <18680.33343.330123.562586@ron.nulle.part> <4aad65740810171320n1fa1ba96kae1b269ecf0a4b92@mail.gmail.com> Message-ID: <8763nllrbu.fsf@patagonia.sebmags.homelinux.org> Hi, This is great! Any chance we'll see an r-cran-rpostgresql package in Debian? Cheers, -- Seb From g@||zur @end|ng |rom gm@||@com Fri Oct 24 01:52:49 2008 From: g@||zur @end|ng |rom gm@||@com (Chris Long) Date: Thu, 23 Oct 2008 16:52:49 -0700 Subject: [R-sig-DB] RPostgreSQL dbWriteTable Message-ID: Hi, RPostgreSQL's dbWriteTable uses the technique of saving a temporary file, then loading the temporary file to a table using "COPY ... FROM". This is fine for a local database connection, but fails if you are connected to a remote database. A simple fix is to use a technique similar to either RSQLite or ROracle. I've sent a note to the authors. I'm *really* happy to see this available; it's a tremendous improvement over the existing (and unmaintained) connectivity packages. Kudos to the authors as well as Google for its support. -- Chris Long, San Diego Padres, 100 Park Boulevard, San Diego CA Score: 0, Diff: 1, clong killed by a Harvard Math Team on 1 From @eth @end|ng |rom u@erpr|m@ry@net Sun Oct 26 19:35:35 2008 From: @eth @end|ng |rom u@erpr|m@ry@net (Seth Falcon) Date: Sun, 26 Oct 2008 11:35:35 -0700 Subject: [R-sig-DB] New version of RSQLite 0.7-1 on CRAN Message-ID: <20081026183535.GB328@ziti.local> The new version updates the included SQLite from 3.6.0 to 3.6.4. + seth -- Seth Falcon | http://userprimary.net/user/ From k@p@tp @end|ng |rom gm@||@com Thu Oct 30 07:50:44 2008 From: k@p@tp @end|ng |rom gm@||@com (Prasenjit Kapat) Date: Thu, 30 Oct 2008 02:50:44 -0400 Subject: [R-sig-DB] Compiling RPostgreSQL on Ubuntu? Message-ID: Hi, I am looking for some instructions on compiling the source package on a Ubuntu 8.04 machine with R 2.7.1. Thanks, PK From edd @end|ng |rom deb|@n@org Thu Oct 30 12:14:45 2008 From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel) Date: Thu, 30 Oct 2008 06:14:45 -0500 Subject: [R-sig-DB] Compiling RPostgreSQL on Ubuntu? In-Reply-To: References: Message-ID: <18697.38693.539711.331545@ron.nulle.part> On 30 October 2008 at 02:50, Prasenjit Kapat wrote: | I am looking for some instructions on compiling the source package on | a Ubuntu 8.04 machine with R 2.7.1. No different than 1) Install the Postgresql header files: sudo apt-get install libpq-dev This is always the same: if you want to build against a certain feature or library, you need the corresponding -dev package. 2) Install the RPostgresql package, either via install.packages() from inside R (but you may need to start R via sudo), or using sudo R CMD INSTALL RPostgresql_0.1-1.tar.gz if you downloaded sources. Hope this helps, Dirk -- Three out of two people have difficulties with fractions. From k@p@tp @end|ng |rom gm@||@com Thu Oct 30 19:08:27 2008 From: k@p@tp @end|ng |rom gm@||@com (Prasenjit Kapat) Date: Thu, 30 Oct 2008 14:08:27 -0400 Subject: [R-sig-DB] Compiling RPostgreSQL on Ubuntu? In-Reply-To: <18697.38693.539711.331545@ron.nulle.part> References: <18697.38693.539711.331545@ron.nulle.part> Message-ID: On Thu, Oct 30, 2008 at 7:14 AM, Dirk Eddelbuettel wrote: > > On 30 October 2008 at 02:50, Prasenjit Kapat wrote: > | I am looking for some instructions on compiling the source package on > | a Ubuntu 8.04 machine with R 2.7.1. > > No different than > 1) Install the Postgresql header files: > > sudo apt-get install libpq-dev > > This is always the same: if you want to build against a certain > feature or library, you need the corresponding -dev package. > > 2) Install the RPostgresql package, either via install.packages() from > inside R (but you may need to start R via sudo), or using > > sudo R CMD INSTALL RPostgresql_0.1-1.tar.gz > > if you downloaded sources. > > Hope this helps, Dirk It does indeed. Thanks Dirk. For some reason, don't know why, I was going on the "./configure && make && make install" route with the "raw" sources downloaded from code.google.com. Life is simpler than that :) Regards, PK From dut@ngc @end|ng |rom gm@||@com Fri Oct 31 21:28:41 2008 From: dut@ngc @end|ng |rom gm@||@com (christophe dutang) Date: Fri, 31 Oct 2008 21:28:41 +0100 Subject: [R-sig-DB] rmysql warning and its associated mysql error Message-ID: Hi, I'm currently experiencing problem with the combination of mysql / Rmysql / R when reading the result of a 'big' query. If I select only 4 variables of my mysql table, the result dimension has 56972 rows, I read by pack of 50000, namely the first of 50000 and the second of 6972. In this cas I do not get any DBI warning telling an error of mysql server. But If I read the 21 variables of my table, the result dimension is then 56972 x 21. In R, the first read of 50000 rows is fine but second stops after reading 2182 rows... and a DBI warning is raised RS-DBI driver warning: (error while fetching rows) This problem was raised in 2003, cf. https://stat.ethz.ch/pipermail/r-help/2003-April/032708.html But I found here http://www.mysqlperformanceblog.com/2007/07/06/, that "If you do not check for error it can look as you've done with result set while you only processed a portion of it, which can cause rather hard to catch errors." Does anyone experience this problem? and know how to solve it? Thanks in advance Christophe Dutang PS : I use R 2.7.2 on windows XP pro with RMySQL_0.6-1 and a MySQL community server 5.0 [[alternative HTML version deleted]] From c@o@re@ @end|ng |rom |ep@up@pt Mon Nov 3 01:48:32 2008 From: c@o@re@ @end|ng |rom |ep@up@pt (Carlos Soares) Date: Mon, 03 Nov 2008 00:48:32 +0000 Subject: [R-sig-DB] sqlQuery truncates XML field in SQL Server Message-ID: <490E4A60.8000406@fep.up.pt> Hi all, I execute a sqlQuery command which includes a field of type XML (SQL Server 8 Express) and the result is truncated to 255 chars. I suppose it assumes that the XML field is a NCHAR(255). How can I work around this? Thanks in advance for any tip. Regards, Carlos === platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 8.0 year 2008 month 10 day 20 svn rev 46754 language R version.string R version 2.8.0 (2008-10-20) From je||@horner @end|ng |rom v@nderb||t@edu Mon Nov 3 16:26:40 2008 From: je||@horner @end|ng |rom v@nderb||t@edu (Jeffrey Horner) Date: Mon, 03 Nov 2008 09:26:40 -0600 Subject: [R-sig-DB] rmysql warning and its associated mysql error In-Reply-To: References: Message-ID: <490F1830.1000707@vanderbilt.edu> christophe dutang wrote on 10/31/2008 03:28 PM: > Hi, > > I'm currently experiencing problem with the combination of mysql / Rmysql / > R when reading the result of a 'big' query. If I select only 4 variables of > my mysql table, the result dimension has 56972 rows, I read by pack of > 50000, namely the first of 50000 and the second of 6972. In this cas I do > not get any DBI warning telling an error of mysql server. But If I read the > 21 variables of my table, the result dimension is then 56972 x 21. In R, the > first read of 50000 rows is fine but second stops after reading 2182 rows... > and a DBI warning is raised > > RS-DBI driver warning: (error while fetching rows) > > This problem was raised in 2003, cf. > https://stat.ethz.ch/pipermail/r-help/2003-April/032708.html > > But I found here http://www.mysqlperformanceblog.com/2007/07/06/, that "If > you do not check for error it can look as you've done with result set while > you only processed a portion of it, which can cause rather hard to catch > errors." > > Does anyone experience this problem? and know how to solve it? Try upgrading R to 2.8.0. Can you provide your code to the list... or pseudo code so that we can troubleshoot? Specifically are you calling fetch() or dbApply()? Jeff > > Thanks in advance > > Christophe Dutang > > > PS : I use R 2.7.2 on windows XP pro with RMySQL_0.6-1 and a MySQL community > server 5.0 > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db -- http://biostat.mc.vanderbilt.edu/JeffreyHorner From Sh@||e@h_P@rm@r @end|ng |rom m|@com Tue Nov 4 00:08:38 2008 From: Sh@||e@h_P@rm@r @end|ng |rom m|@com (Parmar, Shailesh (Equity Structured Products Group)) Date: Mon, 3 Nov 2008 18:08:38 -0500 Subject: [R-sig-DB] Getting R to call a stored procedure Message-ID: Keith, Did you ever get this resolved? Thanks, -Shailesh -------------------------------------------------------- This material was prepared by Americas Equity Linked Sales and Trading Personnel of Merrill Lynch and is subject to the terms available at the following link: http://www.ml.com/index.asp?id=7695_71373_71377_71380&type=200.01 . Click here for important additional terms relating to this e-mail. Merrill Lynch does not provide tax, accounting or regulatory advice. Any tax statements contained herein were not intended or written to be used, and cannot be used for the purpose of avoiding U.S., federal, state or local tax penalties. Please consult your advisor as to any tax, accounting or legal statements made herein. -------------------------------------------------------- [[alternative HTML version deleted]] From dut@ngc @end|ng |rom gm@||@com Tue Nov 4 14:07:29 2008 From: dut@ngc @end|ng |rom gm@||@com (christophe dutang) Date: Tue, 4 Nov 2008 14:07:29 +0100 Subject: [R-sig-DB] rmysql warning and its associated mysql error In-Reply-To: <490F1830.1000707@vanderbilt.edu> References: <490F1830.1000707@vanderbilt.edu> Message-ID: Hi all, Here are some details about my code: - I use a mysql server where my whole database is stored, - I'm doing a logistic regression with the package biglm - my 'data function' just does a SQL request for the selected variables and then I read part of it with the function fetch: MySQLdatafun<-function(reset=FALSE) { if(reset) { beginRead <<- 0 endRead <<- 0 dbClearResult(resSQL) resSQL <<- dbSendQuery(con, SQLSelectExplVar) return(NULL) } if(endRead >= lengthData) return(NULL) beginRead<<-endRead+1 endRead<<-endRead+min(chunksize, lengthData-endRead) mydata <<- data.frame(fetch(resSQL, n=endRead-beginRead+1), stringsAsFactors=TRUE) # BTW the last argument 'stringAsFactor' does not seem to work. for(i in 1:NCOL(mydata)) if(class(mydata[1,i]) == "character") mydata[,i] <<- factor(mydata[,i]) mydata } - what's really strange is the problem occurs when I add some code to the biglm package to compute the con/discordant percentage. I can not yet upgrade to 2.8.0 since there is no version of the (d)com server for this version of R. Thanks in advance Christophe Dutang 2008/11/3 Jeffrey Horner > christophe dutang wrote on 10/31/2008 03:28 PM: > >> Hi, >> >> I'm currently experiencing problem with the combination of mysql / Rmysql >> / >> R when reading the result of a 'big' query. If I select only 4 variables >> of >> my mysql table, the result dimension has 56972 rows, I read by pack of >> 50000, namely the first of 50000 and the second of 6972. In this cas I do >> not get any DBI warning telling an error of mysql server. But If I read >> the >> 21 variables of my table, the result dimension is then 56972 x 21. In R, >> the >> first read of 50000 rows is fine but second stops after reading 2182 >> rows... >> and a DBI warning is raised >> >> RS-DBI driver warning: (error while fetching rows) >> >> This problem was raised in 2003, cf. >> https://stat.ethz.ch/pipermail/r-help/2003-April/032708.html >> >> But I found here http://www.mysqlperformanceblog.com/2007/07/06/, that >> "If >> you do not check for error it can look as you've done with result set >> while >> you only processed a portion of it, which can cause rather hard to catch >> errors." >> >> Does anyone experience this problem? and know how to solve it? >> > > Try upgrading R to 2.8.0. > > Can you provide your code to the list... or pseudo code so that we can > troubleshoot? Specifically are you calling fetch() or dbApply()? > > Jeff > > >> Thanks in advance >> >> Christophe Dutang >> >> >> PS : I use R 2.7.2 on windows XP pro with RMySQL_0.6-1 and a MySQL >> community >> server 5.0 >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> R-sig-DB mailing list -- R Special Interest Group >> R-sig-DB at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/r-sig-db >> > > > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > [[alternative HTML version deleted]] From je||@horner @end|ng |rom v@nderb||t@edu Tue Nov 4 16:59:58 2008 From: je||@horner @end|ng |rom v@nderb||t@edu (Jeffrey Horner) Date: Tue, 04 Nov 2008 09:59:58 -0600 Subject: [R-sig-DB] rmysql warning and its associated mysql error In-Reply-To: References: <490F1830.1000707@vanderbilt.edu> Message-ID: <4910717E.4050003@vanderbilt.edu> christophe dutang wrote on 11/04/2008 07:07 AM: > Hi all, > > Here are some details about my code: > > - I use a mysql server where my whole database is stored, > - I'm doing a logistic regression with the package biglm > - my 'data function' just does a SQL request for the selected variables > and then I read part of it with the function fetch: > > MySQLdatafun<-function(reset=FALSE) > { > if(reset) > { > beginRead <<- 0 > endRead <<- 0 > dbClearResult(resSQL) > resSQL <<- dbSendQuery(con, SQLSelectExplVar) > return(NULL) > } > > if(endRead >= lengthData) > return(NULL) > > beginRead<<-endRead+1 > endRead<<-endRead+min(chunksize, lengthData-endRead) > > mydata <<- data.frame(fetch(resSQL, n=endRead-beginRead+1), > stringsAsFactors=TRUE) > # BTW the last argument 'stringAsFactor' does not seem to work. > > for(i in 1:NCOL(mydata)) > if(class(mydata[1,i]) == "character") > mydata[,i] <<- factor(mydata[,i]) > > mydata > } > > - what's really strange is the problem occurs when I add some code to > the biglm package to compute the con/discordant percentage. What do you mean when you "add some code to the biglm package"? Also, can you provide a table schema? Jeff > > I can not yet upgrade to 2.8.0 since there is no version of the (d)com > server for this version of R. > > Thanks in advance > > Christophe Dutang > > 2008/11/3 Jeffrey Horner > > > christophe dutang wrote on 10/31/2008 03:28 PM: > > Hi, > > I'm currently experiencing problem with the combination of mysql > / Rmysql / > R when reading the result of a 'big' query. If I select only 4 > variables of > my mysql table, the result dimension has 56972 rows, I read by > pack of > 50000, namely the first of 50000 and the second of 6972. In this > cas I do > not get any DBI warning telling an error of mysql server. But If > I read the > 21 variables of my table, the result dimension is then 56972 x > 21. In R, the > first read of 50000 rows is fine but second stops after reading > 2182 rows... > and a DBI warning is raised > > RS-DBI driver warning: (error while fetching rows) > > This problem was raised in 2003, cf. > https://stat.ethz.ch/pipermail/r-help/2003-April/032708.html > > But I found here > http://www.mysqlperformanceblog.com/2007/07/06/, that "If > you do not check for error it can look as you've done with > result set while > you only processed a portion of it, which can cause rather hard > to catch > errors." > > Does anyone experience this problem? and know how to solve it? > > > Try upgrading R to 2.8.0. > > Can you provide your code to the list... or pseudo code so that we > can troubleshoot? Specifically are you calling fetch() or dbApply()? > > Jeff > > > Thanks in advance > > Christophe Dutang > > > PS : I use R 2.7.2 on windows XP pro with RMySQL_0.6-1 and a > MySQL community > server 5.0 > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > > > > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > > > > -- http://biostat.mc.vanderbilt.edu/JeffreyHorner From dut@ngc @end|ng |rom gm@||@com Tue Nov 4 18:21:25 2008 From: dut@ngc @end|ng |rom gm@||@com (christophe dutang) Date: Tue, 4 Nov 2008 18:21:25 +0100 Subject: [R-sig-DB] rmysql warning and its associated mysql error In-Reply-To: <4910717E.4050003@vanderbilt.edu> References: <490F1830.1000707@vanderbilt.edu> <4910717E.4050003@vanderbilt.edu> Message-ID: The fit of the GLM is something like this: for(i in ) { while() { * } } * I add here code to compute the con/discordant pair. It is so annoying I can't send you my whole code... 2008/11/4 Jeffrey Horner > christophe dutang wrote on 11/04/2008 07:07 AM: > >> Hi all, >> >> Here are some details about my code: >> >> - I use a mysql server where my whole database is stored, >> - I'm doing a logistic regression with the package biglm >> - my 'data function' just does a SQL request for the selected variables >> and then I read part of it with the function fetch: >> >> MySQLdatafun<-function(reset=FALSE) >> { >> if(reset) >> { >> beginRead <<- 0 >> endRead <<- 0 >> dbClearResult(resSQL) >> resSQL <<- dbSendQuery(con, SQLSelectExplVar) >> return(NULL) >> } >> >> if(endRead >= lengthData) >> return(NULL) >> >> beginRead<<-endRead+1 >> endRead<<-endRead+min(chunksize, lengthData-endRead) >> >> mydata <<- data.frame(fetch(resSQL, n=endRead-beginRead+1), >> stringsAsFactors=TRUE) >> # BTW the last argument 'stringAsFactor' does not seem to work. >> >> for(i in 1:NCOL(mydata)) >> if(class(mydata[1,i]) == "character") >> mydata[,i] <<- factor(mydata[,i]) >> >> mydata >> } >> >> - what's really strange is the problem occurs when I add some code to the >> biglm package to compute the con/discordant percentage. >> > > What do you mean when you "add some code to the biglm package"? > > Also, can you provide a table schema? > > Jeff > > >> I can not yet upgrade to 2.8.0 since there is no version of the (d)com >> server for this version of R. >> >> Thanks in advance >> >> Christophe Dutang >> >> 2008/11/3 Jeffrey Horner > jeff.horner at vanderbilt.edu>> >> >> >> christophe dutang wrote on 10/31/2008 03:28 PM: >> >> Hi, >> >> I'm currently experiencing problem with the combination of mysql >> / Rmysql / >> R when reading the result of a 'big' query. If I select only 4 >> variables of >> my mysql table, the result dimension has 56972 rows, I read by >> pack of >> 50000, namely the first of 50000 and the second of 6972. In this >> cas I do >> not get any DBI warning telling an error of mysql server. But If >> I read the >> 21 variables of my table, the result dimension is then 56972 x >> 21. In R, the >> first read of 50000 rows is fine but second stops after reading >> 2182 rows... >> and a DBI warning is raised >> >> RS-DBI driver warning: (error while fetching rows) >> >> This problem was raised in 2003, cf. >> https://stat.ethz.ch/pipermail/r-help/2003-April/032708.html >> >> But I found here >> http://www.mysqlperformanceblog.com/2007/07/06/, that "If >> you do not check for error it can look as you've done with >> result set while >> you only processed a portion of it, which can cause rather hard >> to catch >> errors." >> >> Does anyone experience this problem? and know how to solve it? >> >> >> Try upgrading R to 2.8.0. >> >> Can you provide your code to the list... or pseudo code so that we >> can troubleshoot? Specifically are you calling fetch() or dbApply()? >> >> Jeff >> >> >> Thanks in advance >> >> Christophe Dutang >> >> >> PS : I use R 2.7.2 on windows XP pro with RMySQL_0.6-1 and a >> MySQL community >> server 5.0 >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> R-sig-DB mailing list -- R Special Interest Group >> R-sig-DB at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/r-sig-db >> >> >> >> -- http://biostat.mc.vanderbilt.edu/JeffreyHorner >> >> >> >> >> > > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > [[alternative HTML version deleted]] From je||@horner @end|ng |rom v@nderb||t@edu Tue Nov 4 18:43:31 2008 From: je||@horner @end|ng |rom v@nderb||t@edu (Jeffrey Horner) Date: Tue, 04 Nov 2008 11:43:31 -0600 Subject: [R-sig-DB] rmysql warning and its associated mysql error In-Reply-To: References: <490F1830.1000707@vanderbilt.edu> <4910717E.4050003@vanderbilt.edu> Message-ID: <491089C3.9020803@vanderbilt.edu> At this point, I would suggest providing a reproducible example that you can share with the list, as I cannot troubleshoot your pseudo code. Your problem could possibly come from biglm and not RMySQL. Also, I presume you tried to answer my previous questions, which were: What do you mean when you "add some code to the biglm package"? So, you're really not adding code to biglm, only utilizing it with the below pseudo code? Also, I presume you can't provide an example table schema that you are using, but how about the same schema with the names changed? Best, Jeff christophe dutang wrote on 11/04/2008 11:21 AM: > The fit of the GLM is something like this: > > for(i in ) > { > while() > { > > > * > > } > > } > > > > * I add here code to compute the con/discordant pair. > > It is so annoying I can't send you my whole code... > > > 2008/11/4 Jeffrey Horner > > > christophe dutang wrote on 11/04/2008 07:07 AM: > > Hi all, > > Here are some details about my code: > > - I use a mysql server where my whole database is stored, > - I'm doing a logistic regression with the package biglm > - my 'data function' just does a SQL request for the selected > variables and then I read part of it with the function fetch: > > MySQLdatafun<-function(reset=FALSE) > { > if(reset) > { > beginRead <<- 0 > endRead <<- 0 > dbClearResult(resSQL) > resSQL <<- dbSendQuery(con, SQLSelectExplVar) > return(NULL) > } > > if(endRead >= lengthData) > return(NULL) > > beginRead<<-endRead+1 > endRead<<-endRead+min(chunksize, lengthData-endRead) > > mydata <<- data.frame(fetch(resSQL, n=endRead-beginRead+1), > stringsAsFactors=TRUE) > # BTW the last argument 'stringAsFactor' does not seem to work. > > for(i in 1:NCOL(mydata)) > if(class(mydata[1,i]) == "character") > mydata[,i] <<- factor(mydata[,i]) > > mydata > } > > - what's really strange is the problem occurs when I add some > code to the biglm package to compute the con/discordant percentage. > > > What do you mean when you "add some code to the biglm package"? > > Also, can you provide a table schema? > > Jeff > > > I can not yet upgrade to 2.8.0 since there is no version of the > (d)com server for this version of R. > > Thanks in advance > > Christophe Dutang > > 2008/11/3 Jeffrey Horner > >> > > > christophe dutang wrote on 10/31/2008 03:28 PM: > > Hi, > > I'm currently experiencing problem with the combination > of mysql > / Rmysql / > R when reading the result of a 'big' query. If I select > only 4 > variables of > my mysql table, the result dimension has 56972 rows, I > read by > pack of > 50000, namely the first of 50000 and the second of 6972. > In this > cas I do > not get any DBI warning telling an error of mysql server. > But If > I read the > 21 variables of my table, the result dimension is then > 56972 x > 21. In R, the > first read of 50000 rows is fine but second stops after > reading > 2182 rows... > and a DBI warning is raised > > RS-DBI driver warning: (error while fetching rows) > > This problem was raised in 2003, cf. > https://stat.ethz.ch/pipermail/r-help/2003-April/032708.html > > But I found here > http://www.mysqlperformanceblog.com/2007/07/06/, that "If > you do not check for error it can look as you've done with > result set while > you only processed a portion of it, which can cause > rather hard > to catch > errors." > > Does anyone experience this problem? and know how to > solve it? > > > Try upgrading R to 2.8.0. > > > Can you provide your code to the list... or pseudo code so > that we > can troubleshoot? Specifically are you calling fetch() or > dbApply()? > > Jeff > > > Thanks in advance > > Christophe Dutang > > > PS : I use R 2.7.2 on windows XP pro with RMySQL_0.6-1 and a > MySQL community > server 5.0 > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > > > > > https://stat.ethz.ch/mailman/listinfo/r-sig-db > > > > -- http://biostat.mc.vanderbilt.edu/JeffreyHorner > > > > > > > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > > -- http://biostat.mc.vanderbilt.edu/JeffreyHorner From dut@ngc @end|ng |rom gm@||@com Wed Nov 5 14:47:04 2008 From: dut@ngc @end|ng |rom gm@||@com (christophe dutang) Date: Wed, 5 Nov 2008 14:47:04 +0100 Subject: [R-sig-DB] rmysql warning and its associated mysql error In-Reply-To: <491089C3.9020803@vanderbilt.edu> References: <490F1830.1000707@vanderbilt.edu> <4910717E.4050003@vanderbilt.edu> <491089C3.9020803@vanderbilt.edu> Message-ID: What I really add to biglm is a predict and a anova method, but those ones work. I will try to do a reproductive example I can send you. Thanks again Christophe 2008/11/4 Jeffrey Horner > At this point, I would suggest providing a reproducible example that you > can share with the list, as I cannot troubleshoot your pseudo code. Your > problem could possibly come from biglm and not RMySQL. > > Also, I presume you tried to answer my previous questions, which were: > > What do you mean when you "add some code to the biglm package"? > > So, you're really not adding code to biglm, only utilizing it with the > below pseudo code? > > Also, I presume you can't provide an example table schema that you are > using, but how about the same schema with the names changed? > > Best, > > Jeff > > christophe dutang wrote on 11/04/2008 11:21 AM: > >> The fit of the GLM is something like this: >> >> for(i in ) >> { >> while() >> { >> >> >> * >> >> } >> >> } >> >> >> >> * I add here code to compute the con/discordant pair. >> >> It is so annoying I can't send you my whole code... >> >> >> 2008/11/4 Jeffrey Horner > jeff.horner at vanderbilt.edu>> >> >> >> christophe dutang wrote on 11/04/2008 07:07 AM: >> >> Hi all, >> >> Here are some details about my code: >> >> - I use a mysql server where my whole database is stored, >> - I'm doing a logistic regression with the package biglm >> - my 'data function' just does a SQL request for the selected >> variables and then I read part of it with the function fetch: >> >> MySQLdatafun<-function(reset=FALSE) >> { >> if(reset) >> { >> beginRead <<- 0 >> endRead <<- 0 >> dbClearResult(resSQL) >> resSQL <<- dbSendQuery(con, SQLSelectExplVar) >> return(NULL) >> } >> >> if(endRead >= lengthData) >> return(NULL) >> >> beginRead<<-endRead+1 >> endRead<<-endRead+min(chunksize, lengthData-endRead) >> >> mydata <<- data.frame(fetch(resSQL, n=endRead-beginRead+1), >> stringsAsFactors=TRUE) >> # BTW the last argument 'stringAsFactor' does not seem to work. >> >> for(i in 1:NCOL(mydata)) >> if(class(mydata[1,i]) == "character") >> mydata[,i] <<- factor(mydata[,i]) >> >> mydata >> } >> >> - what's really strange is the problem occurs when I add some >> code to the biglm package to compute the con/discordant percentage. >> >> >> What do you mean when you "add some code to the biglm package"? >> >> Also, can you provide a table schema? >> >> Jeff >> >> >> I can not yet upgrade to 2.8.0 since there is no version of the >> (d)com server for this version of R. >> >> Thanks in advance >> >> Christophe Dutang >> >> 2008/11/3 Jeffrey Horner > >> > >> >> >> >> christophe dutang wrote on 10/31/2008 03:28 PM: >> >> Hi, >> >> I'm currently experiencing problem with the combination >> of mysql >> / Rmysql / >> R when reading the result of a 'big' query. If I select >> only 4 >> variables of >> my mysql table, the result dimension has 56972 rows, I >> read by >> pack of >> 50000, namely the first of 50000 and the second of 6972. >> In this >> cas I do >> not get any DBI warning telling an error of mysql server. >> But If >> I read the >> 21 variables of my table, the result dimension is then >> 56972 x >> 21. In R, the >> first read of 50000 rows is fine but second stops after >> reading >> 2182 rows... >> and a DBI warning is raised >> >> RS-DBI driver warning: (error while fetching rows) >> >> This problem was raised in 2003, cf. >> >> https://stat.ethz.ch/pipermail/r-help/2003-April/032708.html >> >> But I found here >> http://www.mysqlperformanceblog.com/2007/07/06/, that "If >> you do not check for error it can look as you've done with >> result set while >> you only processed a portion of it, which can cause >> rather hard >> to catch >> errors." >> >> Does anyone experience this problem? and know how to >> solve it? >> >> >> Try upgrading R to 2.8.0. >> >> >> Can you provide your code to the list... or pseudo code so >> that we >> can troubleshoot? Specifically are you calling fetch() or >> dbApply()? >> >> Jeff >> >> >> Thanks in advance >> >> Christophe Dutang >> >> >> PS : I use R 2.7.2 on windows XP pro with RMySQL_0.6-1 and a >> MySQL community >> server 5.0 >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> R-sig-DB mailing list -- R Special Interest Group >> R-sig-DB at stat.math.ethz.ch >> >> > > >> >> https://stat.ethz.ch/mailman/listinfo/r-sig-db >> >> >> >> -- http://biostat.mc.vanderbilt.edu/JeffreyHorner >> >> >> >> >> >> >> -- http://biostat.mc.vanderbilt.edu/JeffreyHorner >> >> >> > > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > -- Christophe DUTANG Ph. D. student jointly at ISFA and AXA GRM [[alternative HTML version deleted]] From k@p@tp @end|ng |rom gm@||@com Thu Nov 6 22:19:56 2008 From: k@p@tp @end|ng |rom gm@||@com (Prasenjit Kapat) Date: Thu, 6 Nov 2008 16:19:56 -0500 Subject: [R-sig-DB] dbWriteTable permission errors using RPostgreSQL Message-ID: Hi, I am using the rpostgresql-0.1-2 package with R 2.7.1 on a RedHat EL 5 machine. There were no errors/warning while installing it but I get this permission error while using dbWriteTable: > if (dbExistsTable(con, "tmp_vidtable")) dbRemoveTable(con,"tmp_vidtable") > mydata2 <- data.frame(x=1:3, y=4:6) > dbWriteTable(con,"tmp_vidtable",mydata2) Error in postgresqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not Retrieve the result : ERROR: could not open file "/tmp/rsdbi1da2f885" for reading: Permission denied) [1] FALSE Warning message: In postgresqlWriteTable(conn, name, value, ...) : could not load data into table I can create tables using dbGetQuery, for example the following works: > dbGetQuery(con, "create table tmp_vidtable AS ( select * from other_table )") [1] TRUE Is it possible to hold this temporary file "/tmp/rsdbi..." (ie not get deleted) and see the permissions on it? I guess there is some problem in setting up the postgresql server/user/roles/.... But I have not faced any such issues when working from pgadminIII or directly from psql prompt, so I am not exactly sure how to debug. Any help is greatly appreciated. I really need to get this working.... Regards, PK From edd @end|ng |rom deb|@n@org Thu Nov 6 22:36:56 2008 From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel) Date: Thu, 6 Nov 2008 15:36:56 -0600 Subject: [R-sig-DB] dbWriteTable permission errors using RPostgreSQL In-Reply-To: References: Message-ID: <18707.25464.748882.523213@ron.nulle.part> On 6 November 2008 at 16:19, Prasenjit Kapat wrote: | Hi, | | I am using the rpostgresql-0.1-2 package with R 2.7.1 on a RedHat EL 5 | machine. There were no errors/warning while installing it but I get | this permission error while using dbWriteTable: | | > if (dbExistsTable(con, "tmp_vidtable")) dbRemoveTable(con,"tmp_vidtable") | > mydata2 <- data.frame(x=1:3, y=4:6) | > dbWriteTable(con,"tmp_vidtable",mydata2) | Error in postgresqlExecStatement(conn, statement, ...) : | RS-DBI driver: (could not Retrieve the result : ERROR: could not | open file "/tmp/rsdbi1da2f885" for reading: Permission denied) | [1] FALSE | Warning message: | In postgresqlWriteTable(conn, name, value, ...) : | could not load data into table Did you see the README section entitled 'Important Information' ? Important Information: 1. dbWriteTable method is found to fail in some flavours of Linux like RedHat distributions because of SELinux. SELinux is preventing PostgreSQL to access data from locations other than it's data folder. So one of the possible quick solutions is to turn off SELinux temporarily while using this method and turn on later. ## To turn off the SELinux, type the following at the command prompt $ echo 0 > /selinux/enforce/ ## To turn on the SElinux, type the following at the command prompt $ echo 1 > /selinux/enforce/ See if that works. Sameer was definitely bitten by this on his Fedora Core machine; it never affected me on Debian or Ubuntu. | I can create tables using dbGetQuery, for example the following works: | > dbGetQuery(con, "create table tmp_vidtable AS ( select * from other_table )") | [1] TRUE | | Is it possible to hold this temporary file "/tmp/rsdbi..." (ie not get | deleted) and see the permissions on it? Yes. It appears that SE Linux gets in the way of tempfiles created by you and to be consumed by the postgres user. | I guess there is some problem in setting up the postgresql | server/user/roles/.... But I have not faced any such issues when | working from pgadminIII or directly from psql prompt, so I am not | exactly sure how to debug. | | Any help is greatly appreciated. I really need to get this working.... Good luck. If you find a better / more generic fix, let me know and I update the documentation. Dirk -- Three out of two people have difficulties with fractions. From k@p@tp @end|ng |rom gm@||@com Fri Nov 7 00:35:53 2008 From: k@p@tp @end|ng |rom gm@||@com (Prasenjit Kapat) Date: Thu, 6 Nov 2008 18:35:53 -0500 Subject: [R-sig-DB] dbWriteTable permission errors using RPostgreSQL In-Reply-To: <18707.25464.748882.523213@ron.nulle.part> References: <18707.25464.748882.523213@ron.nulle.part> Message-ID: On Thu, Nov 6, 2008 at 4:36 PM, Dirk Eddelbuettel wrote: > > On 6 November 2008 at 16:19, Prasenjit Kapat wrote: > | Hi, > | > | I am using the rpostgresql-0.1-2 package with R 2.7.1 on a RedHat EL 5 > | machine. There were no errors/warning while installing it but I get > | this permission error while using dbWriteTable: > | > | > if (dbExistsTable(con, "tmp_vidtable")) dbRemoveTable(con,"tmp_vidtable") > | > mydata2 <- data.frame(x=1:3, y=4:6) > | > dbWriteTable(con,"tmp_vidtable",mydata2) > | Error in postgresqlExecStatement(conn, statement, ...) : > | RS-DBI driver: (could not Retrieve the result : ERROR: could not > | open file "/tmp/rsdbi1da2f885" for reading: Permission denied) > | [1] FALSE > | Warning message: > | In postgresqlWriteTable(conn, name, value, ...) : > | could not load data into table > > Did you see the README section entitled 'Important Information' ? Well, my bad, should've checked it. > Important Information: > > 1. dbWriteTable method is found to fail in some flavours of Linux like RedHat > distributions because of SELinux. SELinux is preventing PostgreSQL to > access data from locations other than it's data folder. So one of the > possible quick solutions is to turn off SELinux temporarily while using > this method and turn on later. > > ## To turn off the SELinux, type the following at the command prompt > $ echo 0 > /selinux/enforce/ > ## To turn on the SElinux, type the following at the command prompt > $ echo 1 > /selinux/enforce/ Now, that is a killer blow! This is a department machine. I am just a user and I don't think they'll "compromise" the system for me! BTW, /selinux folder is empty here. Is that equivalent to "echo 1 > /selinux/enforce/" ? > See if that works. Sameer was definitely bitten by this on his Fedora Core > machine; it never affected me on Debian or Ubuntu. I just tried it on my home Ubuntu machine; no problems, as you mentioned. > | But I have not faced any such issues when > | working from pgadminIII or directly from psql prompt Now, that I see where the problem is, let me retract on this statement; I did face this situation. My solution was to create a specific folder (sort of data dump) and do a "chmod o+r" on all the files in there, and delete them once done. > Good luck. If you find a better / more generic fix, let me know and I update > the documentation. I'll talk with sysadm tomorrow for the selinux thing. But I seriously doubt against it. In which case, dbWriteTable is unuseable. On RedHat flavored machines, here is my quick-n-dirty solution: ## BEGIN { TMPTABLE <- "tmptable" if (dbExistsTable(con, TMPTABLE)) dbRemoveTable(con, TMPTABLE) (mydata <- data.frame(x=1:3, y=4:6)) TMPDIR <- "/tmp"; FILENAME <- system("mktemp rpsql.XXXXXX", intern=TRUE); (FULLPATH <- paste(TMPDIR, FILENAME, sep="/")) write.csv(mydata, file=FULLPATH, row.names=FALSE) ## I am unable to set field.names argument here.. But that is a different issue, or is it? dbGetQuery(con, dbBuildTableDefinition(con, TMPTABLE, mydata2, row.names = FALSE)) ## The trivial key is this one: system(paste("chmod o+r ", FULLPATH)) dbGetQuery(con, paste("COPY ", TMPTABLE," FROM '", FULLPATH,"' WITH CSV HEADER QUOTE AS '\"'", sep="")) system(paste("rm -f ", FULLPATH)) ## END } Is this a viable solution to be wrapped inside dbWriteTable() for RedHat machines? Thanks, for the very prompt response Dirk, much appreciated. Regards -- PK From k@p@tp @end|ng |rom gm@||@com Fri Nov 7 00:59:33 2008 From: k@p@tp @end|ng |rom gm@||@com (Prasenjit Kapat) Date: Thu, 6 Nov 2008 18:59:33 -0500 Subject: [R-sig-DB] errors using the field.types arg in dbBuildTableDefinition() for RPostgreSQL Message-ID: Well, here is the problem: > (mydata2 <- data.frame(x=1:3, y=4:6)) > dbBuildTableDefinition(con, "tmp_vidtable", mydata2, field.types=c("smallint", "smallint"), row.names = FALSE) > dbBuildTableDefinition(con, "tmp_vidtable", mydata2, field.types = c("integer", "integer"), row.names = FALSE) > dbBuildTableDefinition(con, "tmp_vidtable", mydata2, field.types = "", row.names = FALSE) > dbBuildTableDefinition(con, "tmp_vidtable", mydata2, field.types = NULL, row.names = FALSE) All the above calls to dbBuildTableDefinition give the following error: Error in function (classes, fdef, mtable) : unable to find an inherited method for function "make.db.names", for signature "PostgreSQLConnection", "NULL" But this works, albeit forcing the bigint type: > dbBuildTableDefinition(con, "tmp_vidtable", mydata2, row.names = FALSE) [1] "CREATE TABLE tmp_vidtable \n( x bigint,\n\ty bigint \n)" ^ ^^ OK, this is a petty issue: the above SQL statement is not "indented" correctly :) Getting back, ?dbBuildTableDefinition shows the following: field.types optional named list of the types for each field in obj Am I interpreting it wrongly? Thanks. -- PK From k@p@tp @end|ng |rom gm@||@com Fri Nov 7 01:49:54 2008 From: k@p@tp @end|ng |rom gm@||@com (Prasenjit Kapat) Date: Thu, 6 Nov 2008 19:49:54 -0500 Subject: [R-sig-DB] dbWriteTable permission errors using RPostgreSQL In-Reply-To: <18707.25464.748882.523213@ron.nulle.part> References: <18707.25464.748882.523213@ron.nulle.part> Message-ID: On Thu, Nov 6, 2008 at 4:36 PM, Dirk Eddelbuettel wrote: > > On 6 November 2008 at 16:19, Prasenjit Kapat wrote: > > 1. dbWriteTable method is found to fail in some flavours of Linux like RedHat > distributions because of SELinux. SELinux is preventing PostgreSQL to > access data from locations other than it's data folder. So one of the > possible quick solutions is to turn off SELinux temporarily while using > this method and turn on later. > > ## To turn off the SELinux, type the following at the command prompt > $ echo 0 > /selinux/enforce/ > ## To turn on the SElinux, type the following at the command prompt > $ echo 1 > /selinux/enforce/ On this Red Hat EL5 machine, selinux seems to be disabled: $ sestatus SELinux status: disabled And I verified from the sysadm here, that SELinux is not used. So, wherein lies the problem? From k@p@tp @end|ng |rom gm@||@com Fri Nov 7 02:31:10 2008 From: k@p@tp @end|ng |rom gm@||@com (Prasenjit Kapat) Date: Thu, 6 Nov 2008 20:31:10 -0500 Subject: [R-sig-DB] errors using the field.types arg in dbBuildTableDefinition() for RPostgreSQL In-Reply-To: References: Message-ID: Ignore my earlier mail on this subject. Sorry for spamming. On Thu, Nov 6, 2008 at 6:59 PM, Prasenjit Kapat wrote: > Getting back, ?dbBuildTableDefinition shows the following: > > field.types optional named list of the types for each field in obj > > Am I interpreting it wrongly? Yes I did! It is a "named-list" and not a character vector :(( From @e@npor @end|ng |rom @cm@org Fri Nov 7 07:06:21 2008 From: @e@npor @end|ng |rom @cm@org (Sean O'Riordain) Date: Fri, 7 Nov 2008 06:06:21 +0000 Subject: [R-sig-DB] [Rd] problems executing a bulk load with SQL server In-Reply-To: <3c57fdf0811061553s205c8d64j9d8aeb2d8f4cb64b@mail.gmail.com> References: <3c57fdf0811061553s205c8d64j9d8aeb2d8f4cb64b@mail.gmail.com> Message-ID: <8ed68eed0811062206u4c0309eas7aef4b83e1a32da5@mail.gmail.com> Good morning Grey, Can you execute that query from the isql command line? Just a wild guess but ry mixing up the forward backward slashes... \\\\rhea/users/Risk/Dump/ this used to be needed in older versions of R for network drives Regards, Sean On Thu, Nov 6, 2008 at 11:53 PM, Grey Moran Tzamouranis wrote: > Hello, > > New to this forum so I hope the content is appropriate... > > I was building a some code to maniputlate some data. Given the bulk of it > (the csv is about a GB), I opted to use a database. > The setup, which may be part of the issue is that the SQL is one remote > machine (call it 'A'), the disk that contains the data is on some other > remote drive - call it 'B' and the server on which I program is a third > machine with access to both A and B. SQL Server is 2003, I believe, and the > environment is XP. > > Commands such as "CREATE TABLE", "SELECT * FROM", "ALTER TABLE" and "INSERT" > data work well. > But, given the size of the data to be loaded, I had to opt for a bulk load > like this: > sqlQuery(channel, "BULK INSERT mytable FROM > \\\\rhea\\users\\Risk\\Dump\\myfile.csv WITH (FIRSTROW=2, LASTROW=10);") > The response is > [1] "[RODBC] ERROR: Could not > SQLExecDirect" > [2] "42000 170 [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: > Incorrect syntax near '\\'." > Similar errors are produced by using the "/" slashes instead. Therefore, > the first question would be: "Where do I go wrong with my file definition?" > > A stored procedure the dba created to get around this problem also produces > an error but without much content. > > The stored procedure definition would be something like: > > create procedure LoadFile ( @TableName varchar(256), @FileName varchar(256) > ) > > as > > begin > > declare @FilePath varchar(1024); > > declare @Command varchar(1024); > > set @FilePath = '*\\rhea\users\Risk\Dump\* ' + > @FileName; > > set @Command = 'BULK INSERT ' + @TableName + ' FROM ' + Char(39) + @FilePath > + Char(39) + ' WITH (FIRSTROW=2, LASTROW=10)'; > > exec (@Command); > > end; > > When I issue the command: > > sqlQuery(channel, "exec LoadFile 'US15Aug2008', > 'US_15Aug2008_50paths.csv';") > > I get the cryptic message: > > [1] "[RODBC] ERROR: Could not SQLExecDirect" > Any ideas? Anything would be highly appreciated! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Fri Nov 7 09:12:47 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Fri, 7 Nov 2008 08:12:47 +0000 (GMT) Subject: [R-sig-DB] [Rd] problems executing a bulk load with SQL server In-Reply-To: <8ed68eed0811062206u4c0309eas7aef4b83e1a32da5@mail.gmail.com> References: <3c57fdf0811061553s205c8d64j9d8aeb2d8f4cb64b@mail.gmail.com> <8ed68eed0811062206u4c0309eas7aef4b83e1a32da5@mail.gmail.com> Message-ID: On Fri, 7 Nov 2008, Sean O'Riordain wrote: > Good morning Grey, > > Can you execute that query from the isql command line? > > Just a wild guess but ry mixing up the forward backward slashes... > \\\\rhea/users/Risk/Dump/ > this used to be needed in older versions of R for network drives No, that command is being read by SQL Server, not by R. However, character strings such as file paths in SQL need to be quoted under quite a few circumstances, including here. The lack of quoting is the syntax error. This was quite inappropriate for R-devel and Sean has correctly moved it to R-sig-db. But even here, the issue is about the SQL syntax needed for the DBMS and not about R (nor any package that may have be used without giving due credit). > > Regards, > Sean > > On Thu, Nov 6, 2008 at 11:53 PM, Grey Moran Tzamouranis > wrote: >> Hello, >> >> New to this forum so I hope the content is appropriate... >> >> I was building a some code to maniputlate some data. Given the bulk of it >> (the csv is about a GB), I opted to use a database. >> The setup, which may be part of the issue is that the SQL is one remote >> machine (call it 'A'), the disk that contains the data is on some other >> remote drive - call it 'B' and the server on which I program is a third >> machine with access to both A and B. SQL Server is 2003, I believe, and the >> environment is XP. >> >> Commands such as "CREATE TABLE", "SELECT * FROM", "ALTER TABLE" and "INSERT" >> data work well. >> But, given the size of the data to be loaded, I had to opt for a bulk load >> like this: >> sqlQuery(channel, "BULK INSERT mytable FROM >> \\\\rhea\\users\\Risk\\Dump\\myfile.csv WITH (FIRSTROW=2, LASTROW=10);") >> The response is >> [1] "[RODBC] ERROR: Could not >> SQLExecDirect" >> [2] "42000 170 [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: >> Incorrect syntax near '\\'." >> Similar errors are produced by using the "/" slashes instead. Therefore, >> the first question would be: "Where do I go wrong with my file definition?" >> >> A stored procedure the dba created to get around this problem also produces >> an error but without much content. >> >> The stored procedure definition would be something like: >> >> create procedure LoadFile ( @TableName varchar(256), @FileName varchar(256) >> ) >> >> as >> >> begin >> >> declare @FilePath varchar(1024); >> >> declare @Command varchar(1024); >> >> set @FilePath = '*\\rhea\users\Risk\Dump\* ' + >> @FileName; >> >> set @Command = 'BULK INSERT ' + @TableName + ' FROM ' + Char(39) + @FilePath >> + Char(39) + ' WITH (FIRSTROW=2, LASTROW=10)'; >> >> exec (@Command); >> >> end; >> >> When I issue the command: >> >> sqlQuery(channel, "exec LoadFile 'US15Aug2008', >> 'US_15Aug2008_50paths.csv';") >> >> I get the cryptic message: >> >> [1] "[RODBC] ERROR: Could not SQLExecDirect" >> Any ideas? Anything would be highly appreciated! >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From grey@mor@n @end|ng |rom gm@||@com Fri Nov 7 13:41:44 2008 From: grey@mor@n @end|ng |rom gm@||@com (Grey Moran) Date: Fri, 7 Nov 2008 07:41:44 -0500 Subject: [R-sig-DB] [Rd] problems executing a bulk load with SQL server In-Reply-To: References: <3c57fdf0811061553s205c8d64j9d8aeb2d8f4cb64b@mail.gmail.com> <8ed68eed0811062206u4c0309eas7aef4b83e1a32da5@mail.gmail.com> Message-ID: <3c57fdf0811070441p51f1aceal5376527b9b111e7d@mail.gmail.com> I tried Prof Ripley's advice (i.e. to add the extra quotes arourn the path & filename) as follows: sqlQuery(channel, createTable.q) # successful loadData.q <- paste("BULK INSERT ", newTableName, " FROM '", inputCSV, "' WITH (FIRSTROW=2, LASTROW=10);", sep="") > loadData.q [1] "BULK INSERT US15Aug2008 FROM '\\\\rhea\\users\\Risk\\Dump\\US_15Aug2008_50paths.csv' WITH (FIRSTROW=2, LASTROW=10);" sqlQuery(channel, loadData.q ) [1] "[RODBC] ERROR: Could not SQLExecDirect" The error returned is very laconic - i.e. no clear error message is given beyond 'could not execute'. Sean, I do not have access to the iSQL command line. Thank you both for the help offered. My questions are offered with some trepidation for protocol and content naivete but so far the web search and my dba have not managed to resolve this. Grey On Fri, Nov 7, 2008 at 3:12 AM, Prof Brian Ripley wrote: > > On Fri, 7 Nov 2008, Sean O'Riordain wrote: > >> Good morning Grey, >> >> Can you execute that query from the isql command line? >> >> Just a wild guess but ry mixing up the forward backward slashes... >> \\\\rhea/users/Risk/Dump/ >> this used to be needed in older versions of R for network drives > > No, that command is being read by SQL Server, not by R. > > However, character strings such as file paths in SQL need to be quoted under quite a few circumstances, including here. The lack of quoting is the syntax error. > > This was quite inappropriate for R-devel and Sean has correctly moved it to R-sig-db. But even here, the issue is about the SQL syntax needed for the DBMS and not about R (nor any package that may have be used without giving due credit). > >> >> Regards, >> Sean >> >> On Thu, Nov 6, 2008 at 11:53 PM, Grey Moran Tzamouranis >> wrote: >>> >>> Hello, >>> >>> New to this forum so I hope the content is appropriate... >>> >>> I was building a some code to maniputlate some data. Given the bulk of it >>> (the csv is about a GB), I opted to use a database. >>> The setup, which may be part of the issue is that the SQL is one remote >>> machine (call it 'A'), the disk that contains the data is on some other >>> remote drive - call it 'B' and the server on which I program is a third >>> machine with access to both A and B. SQL Server is 2003, I believe, and the >>> environment is XP. >>> >>> Commands such as "CREATE TABLE", "SELECT * FROM", "ALTER TABLE" and "INSERT" >>> data work well. >>> But, given the size of the data to be loaded, I had to opt for a bulk load >>> like this: >>> sqlQuery(channel, "BULK INSERT mytable FROM >>> \\\\rhea\\users\\Risk\\Dump\\myfile.csv WITH (FIRSTROW=2, LASTROW=10);") >>> The response is >>> [1] "[RODBC] ERROR: Could not >>> SQLExecDirect" >>> [2] "42000 170 [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: >>> Incorrect syntax near '\\'." >>> Similar errors are produced by using the "/" slashes instead. Therefore, >>> the first question would be: "Where do I go wrong with my file definition?" >>> >>> A stored procedure the dba created to get around this problem also produces >>> an error but without much content. >>> >>> The stored procedure definition would be something like: >>> >>> create procedure LoadFile ( @TableName varchar(256), @FileName varchar(256) >>> ) >>> >>> as >>> >>> begin >>> >>> declare @FilePath varchar(1024); >>> >>> declare @Command varchar(1024); >>> >>> set @FilePath = '*\\rhea\users\Risk\Dump\* ' + >>> @FileName; >>> >>> set @Command = 'BULK INSERT ' + @TableName + ' FROM ' + Char(39) + @FilePath >>> + Char(39) + ' WITH (FIRSTROW=2, LASTROW=10)'; >>> >>> exec (@Command); >>> >>> end; >>> >>> When I issue the command: >>> >>> sqlQuery(channel, "exec LoadFile 'US15Aug2008', >>> 'US_15Aug2008_50paths.csv';") >>> >>> I get the cryptic message: >>> >>> [1] "[RODBC] ERROR: Could not SQLExecDirect" >>> Any ideas? Anything would be highly appreciated! >>> >>> [[alternative HTML version deleted]] >>> >>> ______________________________________________ >>> R-devel at r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-devel >>> >> >> _______________________________________________ >> R-sig-DB mailing list -- R Special Interest Group >> R-sig-DB at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/r-sig-db >> > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 From grey@mor@n @end|ng |rom gm@||@com Wed Nov 12 00:06:24 2008 From: grey@mor@n @end|ng |rom gm@||@com (Grey Moran) Date: Tue, 11 Nov 2008 18:06:24 -0500 Subject: [R-sig-DB] Problems with sqlSave Message-ID: <3c57fdf0811111506y4c28ad09p367e92182050f9db@mail.gmail.com> Hello, I am trying to load data into SQL Server as follows (example simplified for discussion purposes). The returned error complains of a non existent table, which I can nevertheless "see": >channel <- odbcConnect("MktRisk") >createTable.q <- "CREATE TABLE dbo.Arrests (State CHAR(20) NOT NULL, MURDER DECIMAL(6,3) NOT NULL, ASSAULT INTEGER NOT NULL, URBANPOP INTEGER NOT NULL, RAPE DECIMAL(6,3));" >sqlQuery(channel, createTable.q); character(0) > sqlTables(channel) TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS ................. 19 MktRisk dbo sysusers SYSTEM TABLE 20 MktRisk dbo Arrests TABLE .................. > sqlSave(channel, dat=USArrests, tablename=Arrests, rownames = "state", addPK=TRUE) Error in sqlSave(channel, dat = USArrests, tablename = Arrests, rownames = "state", : object "Arrests" not found in the real case (more complex and hard to show here), I get this error: Error in sqlSave(channel, dat = the.bridge.df, tablename = someTable, : unable to append to table 'US15Aug2008BridgeTable' As far as I can tell, the tables I create are of the appropriate kind - any ideas what might be the problem? Thank you, Grey From @d@v|@2 @end|ng |rom m@||@n|h@gov Wed Nov 12 01:24:14 2008 From: @d@v|@2 @end|ng |rom m@||@n|h@gov (Sean Davis) Date: Tue, 11 Nov 2008 19:24:14 -0500 Subject: [R-sig-DB] Problems with sqlSave In-Reply-To: <3c57fdf0811111506y4c28ad09p367e92182050f9db@mail.gmail.com> References: <3c57fdf0811111506y4c28ad09p367e92182050f9db@mail.gmail.com> Message-ID: <264855a00811111624p1ea9caa0i32153f559b55a761@mail.gmail.com> On Tue, Nov 11, 2008 at 6:06 PM, Grey Moran wrote: > Hello, > I am trying to load data into SQL Server as follows (example > simplified for discussion purposes). The returned error complains of a > non existent table, which I can nevertheless "see": > > >channel <- odbcConnect("MktRisk") > >createTable.q <- "CREATE TABLE dbo.Arrests (State CHAR(20) NOT NULL, > MURDER DECIMAL(6,3) NOT NULL, ASSAULT INTEGER NOT NULL, URBANPOP INTEGER NOT > NULL, RAPE DECIMAL(6,3));" > >sqlQuery(channel, createTable.q); > character(0) > > sqlTables(channel) > TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS > ................. > 19 MktRisk dbo sysusers SYSTEM TABLE > 20 MktRisk dbo Arrests TABLE > .................. > > > sqlSave(channel, dat=USArrests, tablename=Arrests, rownames = "state", > addPK=TRUE) > Error in sqlSave(channel, dat = USArrests, tablename = Arrests, > rownames = "state", : object "Arrests" not found You need quotes around "Arrests", I think. Sean > > > in the real case (more complex and hard to show here), I get this error: > Error in sqlSave(channel, dat = the.bridge.df, tablename = someTable, > : unable to append to table 'US15Aug2008BridgeTable' > > As far as I can tell, the tables I create are of the appropriate kind > - any ideas what might be the problem? > > Thank you, > > Grey > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > [[alternative HTML version deleted]] From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Wed Nov 12 10:08:59 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Wed, 12 Nov 2008 09:08:59 +0000 (GMT) Subject: [R-sig-DB] Failure to give due credit whilst blaming others for your own mistakes (was Problems with sqlSave) In-Reply-To: <3c57fdf0811111506y4c28ad09p367e92182050f9db@mail.gmail.com> References: <3c57fdf0811111506y4c28ad09p367e92182050f9db@mail.gmail.com> Message-ID: On Tue, 11 Nov 2008, Grey Moran wrote: > Hello, > I am trying to load data into SQL Server as follows (example > simplified for discussion purposes). The returned error complains of a > non existent table, which I can nevertheless "see": > >> channel <- odbcConnect("MktRisk") >> createTable.q <- "CREATE TABLE dbo.Arrests (State CHAR(20) NOT NULL, MURDER DECIMAL(6,3) NOT NULL, ASSAULT INTEGER NOT NULL, URBANPOP INTEGER NOT NULL, RAPE DECIMAL(6,3));" >> sqlQuery(channel, createTable.q); > character(0) >> sqlTables(channel) > TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS > ................. > 19 MktRisk dbo sysusers SYSTEM TABLE > 20 MktRisk dbo Arrests TABLE > .................. > >> sqlSave(channel, dat=USArrests, tablename=Arrests, rownames = "state", addPK=TRUE) > Error in sqlSave(channel, dat = USArrests, tablename = Arrests, > rownames = "state", : object "Arrests" not found That's a simple and basic user error. From the help tablename: character: a database table name accessible from the connected dsn. If missing, the name of 'dat'. The error message says that there is no variable Arrests, and presumably "Arrests" was meant. That is not taking into account that schema seem to be in use and no schema was selected. (I don't use 'SQL Server', but selecting the schema is necessary in some other DBMS.) Note that 'Grey Moran' has given no credit whatsoever for the work of others he is using, not even mentioning the package name. This is not the first offence, and we expect much better in any future help requests -- and studying the R posting guide is not optional. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From je||@horner @end|ng |rom v@nderb||t@edu Thu Nov 13 22:57:04 2008 From: je||@horner @end|ng |rom v@nderb||t@edu (Jeffrey Horner) Date: Thu, 13 Nov 2008 15:57:04 -0600 Subject: [R-sig-DB] RMySQL release candidate 0-7.0 Message-ID: <491CA2B0.6000204@vanderbilt.edu> Hi, I'm the new maintainer for RMySQL and I have a new release candidate for everyone to test. Please download the source or the binary here: http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/RMySQL_0.7-0.tar.gz http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/RMySQL_0.7-0.zip Issues related to memory leaks in dbConnect() and friends have been addressed, and the long-standing \r issue for dbWriteTable() has been addressed. Please provide feedback on these if you can. Also, I'd like the windows/R developer community to provide some feedback on the points below regarding how I've changed the build process: 1.a For previous RMySQL releases, there had been some incantations with reimp (utility in mingw NOT distributed in the latest Rtools.exe [not that it needs to be either]) and dlltool to create an appropriate libmysql.a library to link against. For 0.6-1 and 0.7-0 I could not get this to work. Instead, I chose to place the path to libmysql.lib right into the PKG_LIBS variable. For instance, this is my Makevars.win after an R CMD INSTALL: PKG_CPPFLAGS = -Ic:/PROGRA~1/MYSQL/MYSQLS~1.1/include PKG_LIBS = c:/PROGRA~1/MYSQL/MYSQLS~1.1/lib/opt/libmysql.lib 1.b In addition, binary releases up to and including 0.6-1 installed libmysql.lib and libmysq.dll into the package lib directory, while only the dll is installed for 0.7-0; the lib simply was not needed. 2. Previous RMySQL releases had the installer edit both configure.win and Makevars.win with appropriate paths. I've changed this so that the install only needs to set the env var MYSQL_HOME to an appropriate value, and if one is not provided, a default is chosen. Should a default be chosen or should configure.win fail? TIA, Jeff -- http://biostat.mc.vanderbilt.edu/JeffreyHorner From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Fri Nov 14 16:28:37 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Fri, 14 Nov 2008 15:28:37 +0000 (GMT) Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: <491CA2B0.6000204@vanderbilt.edu> References: <491CA2B0.6000204@vanderbilt.edu> Message-ID: I am pretty sure that distributing libmysql.dll (without the sources) is a license violation on MySQL, and in fact the binary releases made available on CRANextras did not distribute it. The Windows material in the RMySQL sources is years old, and not what has been used recently. My version of MySQL came with .a and not .lib, but neither are needed as you can link against libmysql.dll directly. I'll take a closer look when I have a machine booted into Windows that has MySQL installed, probably over the weekend. On Thu, 13 Nov 2008, Jeffrey Horner wrote: > Hi, > > I'm the new maintainer for RMySQL and I have a new release candidate for > everyone to test. Please download the source or the binary here: > > http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/RMySQL_0.7-0.tar.gz > http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/RMySQL_0.7-0.zip > > Issues related to memory leaks in dbConnect() and friends have been > addressed, and the long-standing \r issue for dbWriteTable() has been > addressed. Please provide feedback on these if you can. > > Also, I'd like the windows/R developer community to provide some feedback on > the points below regarding how I've changed the build process: > > 1.a For previous RMySQL releases, there had been some incantations with reimp > (utility in mingw NOT distributed in the latest Rtools.exe [not that it needs > to be either]) and dlltool to create an appropriate libmysql.a library to > link against. For 0.6-1 and 0.7-0 I could not get this to work. Instead, I > chose to place the path to libmysql.lib right into the PKG_LIBS variable. For > instance, this is my Makevars.win after an R CMD INSTALL: > > PKG_CPPFLAGS = -Ic:/PROGRA~1/MYSQL/MYSQLS~1.1/include > PKG_LIBS = c:/PROGRA~1/MYSQL/MYSQLS~1.1/lib/opt/libmysql.lib > > > 1.b In addition, binary releases up to and including 0.6-1 installed > libmysql.lib and libmysq.dll into the package lib directory, while only the > dll is installed for 0.7-0; the lib simply was not needed. > > 2. Previous RMySQL releases had the installer edit both configure.win and > Makevars.win with appropriate paths. I've changed this so that the install > only needs to set the env var MYSQL_HOME to an appropriate value, and if one > is not provided, a default is chosen. Should a default be chosen or should > configure.win fail? > > > TIA, > > Jeff > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Sun Nov 16 12:26:45 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Sun, 16 Nov 2008 11:26:45 +0000 (GMT) Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: References: <491CA2B0.6000204@vanderbilt.edu> Message-ID: 1) It seems that linking against libmysql.dll works on some versions and not others, so I've left it linking against libmysql.lib (which is an optional install). 2) There were lots of problems if MYSQL_HOME had a space in the path. It was easier to overcome these by using environment variables directly in src/Makevars.win. 3) It is possible to make use of mechanisms introduced in R 2.7.0 to set a DLLpath when loading RMySQL.dll and to retrieve the MySQL location from the Windows registry. So it really isn't necessary to install libmysql.dll. I've written and tested code which does that. 4) Distributing libmysql.dll without the sources is not allowed unless there is an exception somewhere I have not managed to find, as libmysql.dll is distributed under GPL-2. Although MySQL has an exception to allow combination with other FLOSS licences, it is not clear to me that you meet those conditions so perhaps even if you do distribute the sources the package has to be under GPL-2 (and some would interpet that as a requirement even by dynamically linking to libmysql). I don't see any advantage in not licensing RMySQL as GPL-2, which would avoid all the controversy. I'll push you in that direction by stating that the changes I have suggested I would much prefer to be incorporated under GPL-2. 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have worked out a way to have RPostgreSQL built on the main Windows package builder. We could try to do the same here, but none of us are happy with distributing a binary build that has no tests at all (as RMySQL runs no actual examples). So can we please have a test suite? You will need to allow the DBMS account, password and database name to be set via environment variables, as for RPostgreSQL. 6) I've put a version of the revised sources I used to test on Windows (and with updated documentation and unused files removed) at http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I think these days we should only support MySQL 5. BDR On Fri, 14 Nov 2008, Prof Brian Ripley wrote: > I am pretty sure that distributing libmysql.dll (without the sources) is a > license violation on MySQL, and in fact the binary releases made available on > CRANextras did not distribute it. The Windows material in the RMySQL sources > is years old, and not what has been used recently. > > My version of MySQL came with .a and not .lib, but neither are needed as you > can link against libmysql.dll directly. > > I'll take a closer look when I have a machine booted into Windows that has > MySQL installed, probably over the weekend. > > On Thu, 13 Nov 2008, Jeffrey Horner wrote: > >> Hi, >> >> I'm the new maintainer for RMySQL and I have a new release candidate for >> everyone to test. Please download the source or the binary here: >> >> http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/RMySQL_0.7-0.tar.gz >> http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/RMySQL_0.7-0.zip >> >> Issues related to memory leaks in dbConnect() and friends have been >> addressed, and the long-standing \r issue for dbWriteTable() has been >> addressed. Please provide feedback on these if you can. >> >> Also, I'd like the windows/R developer community to provide some feedback >> on the points below regarding how I've changed the build process: >> >> 1.a For previous RMySQL releases, there had been some incantations with >> reimp (utility in mingw NOT distributed in the latest Rtools.exe [not that >> it needs to be either]) and dlltool to create an appropriate libmysql.a >> library to link against. For 0.6-1 and 0.7-0 I could not get this to work. >> Instead, I chose to place the path to libmysql.lib right into the PKG_LIBS >> variable. For instance, this is my Makevars.win after an R CMD INSTALL: >> >> PKG_CPPFLAGS = -Ic:/PROGRA~1/MYSQL/MYSQLS~1.1/include >> PKG_LIBS = c:/PROGRA~1/MYSQL/MYSQLS~1.1/lib/opt/libmysql.lib >> >> >> 1.b In addition, binary releases up to and including 0.6-1 installed >> libmysql.lib and libmysq.dll into the package lib directory, while only the >> dll is installed for 0.7-0; the lib simply was not needed. >> >> 2. Previous RMySQL releases had the installer edit both configure.win and >> Makevars.win with appropriate paths. I've changed this so that the install >> only needs to set the env var MYSQL_HOME to an appropriate value, and if >> one is not provided, a default is chosen. Should a default be chosen or >> should configure.win fail? >> >> >> TIA, >> >> Jeff >> -- >> http://biostat.mc.vanderbilt.edu/JeffreyHorner >> >> _______________________________________________ >> R-sig-DB mailing list -- R Special Interest Group >> R-sig-DB at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/r-sig-db >> > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From ||gge@ @end|ng |rom @t@t|@t|k@tu-dortmund@de Sun Nov 16 13:46:24 2008 From: ||gge@ @end|ng |rom @t@t|@t|k@tu-dortmund@de (Uwe Ligges) Date: Sun, 16 Nov 2008 13:46:24 +0100 Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: References: <491CA2B0.6000204@vanderbilt.edu> Message-ID: <49201620.1070206@statistik.tu-dortmund.de> Prof Brian Ripley wrote: > 1) It seems that linking against libmysql.dll works on some versions and > not others, so I've left it linking against libmysql.lib (which is an > optional install). > > 2) There were lots of problems if MYSQL_HOME had a space in the path. > It was easier to overcome these by using environment variables directly > in src/Makevars.win. > > 3) It is possible to make use of mechanisms introduced in R 2.7.0 to set > a DLLpath when loading RMySQL.dll and to retrieve the MySQL location > from the Windows registry. So it really isn't necessary to install > libmysql.dll. I've written and tested code which does that. > > 4) Distributing libmysql.dll without the sources is not allowed unless > there is an exception somewhere I have not managed to find, as > libmysql.dll is distributed under GPL-2. Although MySQL has an > exception to allow combination with other FLOSS licences, it is not > clear to me that you meet those conditions so perhaps even if you do > distribute the sources the package has to be under GPL-2 (and some would > interpet that as a requirement even by dynamically linking to > libmysql). I don't see any advantage in not licensing RMySQL as GPL-2, > which would avoid all the controversy. I'll push you in that direction > by stating that the changes I have suggested I would much prefer to be > incorporated under GPL-2. > > 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have worked out > a way to have RPostgreSQL built on the main Windows package builder. We > could try to do the same here, but none of us are happy with > distributing a binary build that has no tests at all (as RMySQL runs no > actual examples). So can we please have a test suite? You will need to > allow the DBMS account, password and database name to be set via > environment variables, as for RPostgreSQL. I am happy to hear there is some progress on RMySQL. I can easily install some MySQL instance on the main builder in order to allow checks for RMySQL. Please provide the name of environment variables for account, password and database name that I will set on my machine, e.g. MySQL_database, MySQL_account, MySQL_passwd If you have such a version prepared, please send me the sources *before* submitting it to CRAN so that we can apply some checks in advance. Best wishes, Uwe > 6) I've put a version of the revised sources I used to test on Windows > (and with updated documentation and unused files removed) at > > http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz > > I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I think these > days we should only support MySQL 5. > > BDR > > > On Fri, 14 Nov 2008, Prof Brian Ripley wrote: > >> I am pretty sure that distributing libmysql.dll (without the sources) >> is a license violation on MySQL, and in fact the binary releases made >> available on CRANextras did not distribute it. The Windows material >> in the RMySQL sources is years old, and not what has been used recently. >> >> My version of MySQL came with .a and not .lib, but neither are needed >> as you can link against libmysql.dll directly. >> >> I'll take a closer look when I have a machine booted into Windows that >> has MySQL installed, probably over the weekend. >> >> On Thu, 13 Nov 2008, Jeffrey Horner wrote: >> >>> Hi, >>> >>> I'm the new maintainer for RMySQL and I have a new release candidate >>> for everyone to test. Please download the source or the binary here: >>> >>> http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/RMySQL_0.7-0.tar.gz >>> >>> http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/RMySQL_0.7-0.zip >>> >>> >>> Issues related to memory leaks in dbConnect() and friends have been >>> addressed, and the long-standing \r issue for dbWriteTable() has been >>> addressed. Please provide feedback on these if you can. >>> >>> Also, I'd like the windows/R developer community to provide some >>> feedback on the points below regarding how I've changed the build >>> process: >>> >>> 1.a For previous RMySQL releases, there had been some incantations >>> with reimp (utility in mingw NOT distributed in the latest Rtools.exe >>> [not that it needs to be either]) and dlltool to create an >>> appropriate libmysql.a library to link against. For 0.6-1 and 0.7-0 I >>> could not get this to work. Instead, I chose to place the path to >>> libmysql.lib right into the PKG_LIBS variable. For instance, this is >>> my Makevars.win after an R CMD INSTALL: >>> >>> PKG_CPPFLAGS = -Ic:/PROGRA~1/MYSQL/MYSQLS~1.1/include >>> PKG_LIBS = c:/PROGRA~1/MYSQL/MYSQLS~1.1/lib/opt/libmysql.lib >>> >>> >>> 1.b In addition, binary releases up to and including 0.6-1 installed >>> libmysql.lib and libmysq.dll into the package lib directory, while >>> only the dll is installed for 0.7-0; the lib simply was not needed. >>> >>> 2. Previous RMySQL releases had the installer edit both configure.win >>> and Makevars.win with appropriate paths. I've changed this so that >>> the install only needs to set the env var MYSQL_HOME to an >>> appropriate value, and if one is not provided, a default is chosen. >>> Should a default be chosen or should configure.win fail? >>> >>> >>> TIA, >>> >>> Jeff >>> -- >>> http://biostat.mc.vanderbilt.edu/JeffreyHorner >>> >>> _______________________________________________ >>> R-sig-DB mailing list -- R Special Interest Group >>> R-sig-DB at stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/r-sig-db >>> >> >> -- >> Brian D. Ripley, ripley at stats.ox.ac.uk >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 >> > From edd @end|ng |rom deb|@n@org Sun Nov 16 17:02:41 2008 From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel) Date: Sun, 16 Nov 2008 10:02:41 -0600 Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: References: <491CA2B0.6000204@vanderbilt.edu> Message-ID: <18720.17441.551053.30889@ron.nulle.part> On 16 November 2008 at 11:26, Prof Brian Ripley wrote: | 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have worked out a [ Almost: s/Edel/Eddel/ ] | way to have RPostgreSQL built on the main Windows package builder. We | could try to do the same here, but none of us are happy with distributing | a binary build that has no tests at all (as RMySQL runs no actual | examples). So can we please have a test suite? You will need to allow | the DBMS account, password and database name to be set via environment | variables, as for RPostgreSQL. That was a leftover of me trying to get the Summer of Code whom I mentored for RPostgreSQL student to write 'test-driven' code. Which didn't work so well as he wrote code but few tests, but I ended up writing some tests for him. Kurt then had an issue with these tests running _un_conditionally and hence upsettting CRAN tests (that have no backend) so between Uwe, Brian and myself we came up with code where each file in tests/ starts as ----------------------------------------------------------------------------- if ((Sys.getenv("POSTGRES_USER") != "") & (Sys.getenv("POSTGRES_HOST") != "") & (Sys.getenv("POSTGRES_DATABASE") != "")) { ## try to load our module and abort if this fails stopifnot(require(RPostgreSQL)) ## load the PostgresSQL driver drv <- dbDriver("PostgreSQL") ## can't print result as it contains process id which changes print(summary(drv)) ## connect to the default db con <- dbConnect(drv, user=Sys.getenv("POSTGRES_USER"), password=Sys.getenv("POSTGRES_PASSWD"), host=Sys.getenv("POSTGRES_HOST"), dbname=Sys.getenv("POSTGRES_DATABASE")) # tests follow below ... ----------------------------------------------------------------------------- which allowed Brian and Uwe to test on their end as well. The actual tests are creating (and the removing) tables and ensuring things come out as identical() and/or same class() as the input. I still need to add one for transaction management. | 6) I've put a version of the revised sources I used to test on Windows | (and with updated documentation and unused files removed) at | | http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz | | I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I think these | days we should only support MySQL 5. As Debian maintainer for r-cran-rmysql I'd also be happy to test there. Dirk -- Three out of two people have difficulties with fractions. From pg||bert @end|ng |rom b@nk-b@nque-c@n@d@@c@ Mon Nov 17 16:40:30 2008 From: pg||bert @end|ng |rom b@nk-b@nque-c@n@d@@c@ (Paul Gilbert) Date: Mon, 17 Nov 2008 10:40:30 -0500 Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: <18720.17441.551053.30889@ron.nulle.part> References: <491CA2B0.6000204@vanderbilt.edu> <18720.17441.551053.30889@ron.nulle.part> Message-ID: <4921906E.5000103@bank-banque-canada.ca> Dirk Eddelbuettel wrote: > On 16 November 2008 at 11:26, Prof Brian Ripley wrote: > | 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have worked out a > > [ Almost: s/Edel/Eddel/ ] > > | way to have RPostgreSQL built on the main Windows package builder. We > | could try to do the same here, but none of us are happy with distributing > | a binary build that has no tests at all (as RMySQL runs no actual > | examples). So can we please have a test suite? You will need to allow > | the DBMS account, password and database name to be set via environment > | variables, as for RPostgreSQL. > > That was a leftover of me trying to get the Summer of Code whom I mentored > for RPostgreSQL student to write 'test-driven' code. Which didn't work so > well as he wrote code but few tests, but I ended up writing some tests for > him. Kurt then had an issue with these tests running _un_conditionally and > hence upsettting CRAN tests (that have no backend) so between Uwe, Brian and > myself we came up with code where each file in tests/ starts as > > ----------------------------------------------------------------------------- > if ((Sys.getenv("POSTGRES_USER") != "") & > (Sys.getenv("POSTGRES_HOST") != "") & > (Sys.getenv("POSTGRES_DATABASE") != "")) { I've been setting this information in ~.pgpass (~/.my.cnf for MySQL) in Linux and understood it could be set in Windows %APPDATA%\postgresql\pgpass.conf and C:\my.cnf, although it may be machine specific rather than user specific in Windows. I believe setting this way is considered more secure, although security may not be the concern for package tests. I assume this option was considered. Is there a complication that makes it difficult? Paul > > ## try to load our module and abort if this fails > stopifnot(require(RPostgreSQL)) > > ## load the PostgresSQL driver > drv <- dbDriver("PostgreSQL") > ## can't print result as it contains process id which changes print(summary(drv)) > > ## connect to the default db > con <- dbConnect(drv, > user=Sys.getenv("POSTGRES_USER"), > password=Sys.getenv("POSTGRES_PASSWD"), > host=Sys.getenv("POSTGRES_HOST"), > dbname=Sys.getenv("POSTGRES_DATABASE")) > > > # tests follow below ... > ----------------------------------------------------------------------------- > > which allowed Brian and Uwe to test on their end as well. The actual tests > are creating (and the removing) tables and ensuring things come out as > identical() and/or same class() as the input. I still need to add one for > transaction management. > > | 6) I've put a version of the revised sources I used to test on Windows > | (and with updated documentation and unused files removed) at > | > | http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz > | > | I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I think these > | days we should only support MySQL 5. > > As Debian maintainer for r-cran-rmysql I'd also be happy to test there. > > Dirk > ==================================================================================== La version fran?aise suit le texte anglais. ------------------------------------------------------------------------------------ This email may contain privileged and/or confidential in...{{dropped:26}} From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Mon Nov 17 16:49:21 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Mon, 17 Nov 2008 15:49:21 +0000 (GMT) Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: <4921906E.5000103@bank-banque-canada.ca> References: <491CA2B0.6000204@vanderbilt.edu> <18720.17441.551053.30889@ron.nulle.part> <4921906E.5000103@bank-banque-canada.ca> Message-ID: On Mon, 17 Nov 2008, Paul Gilbert wrote: > Dirk Eddelbuettel wrote: >> On 16 November 2008 at 11:26, Prof Brian Ripley wrote: >> | 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have worked out >> a >> [ Almost: s/Edel/Eddel/ ] >> >> | way to have RPostgreSQL built on the main Windows package builder. We | >> could try to do the same here, but none of us are happy with distributing | >> a binary build that has no tests at all (as RMySQL runs no actual | >> examples). So can we please have a test suite? You will need to allow | >> the DBMS account, password and database name to be set via environment | >> variables, as for RPostgreSQL. >> >> That was a leftover of me trying to get the Summer of Code whom I mentored >> for RPostgreSQL student to write 'test-driven' code. Which didn't work so >> well as he wrote code but few tests, but I ended up writing some tests for >> him. Kurt then had an issue with these tests running _un_conditionally and >> hence upsettting CRAN tests (that have no backend) so between Uwe, Brian >> and >> myself we came up with code where each file in tests/ starts as >> >> >> ----------------------------------------------------------------------------- >> if ((Sys.getenv("POSTGRES_USER") != "") & >> (Sys.getenv("POSTGRES_HOST") != "") & >> (Sys.getenv("POSTGRES_DATABASE") != "")) { > > I've been setting this information in ~.pgpass (~/.my.cnf for MySQL) in Linux > and understood it could be set in Windows %APPDATA%\postgresql\pgpass.conf > and C:\my.cnf, although it may be machine specific rather than user specific > in Windows. I believe setting this way is considered more secure, although > security may not be the concern for package tests. I assume this option was > considered. Is there a complication that makes it difficult? Yes, the DBMS account used for testing is not my own working account. I really don't see giving that having the settings in your file is any more secure: they are even in a known place. Note that I at least do not set a password this way. > > Paul > >> >> ## try to load our module and abort if this fails >> stopifnot(require(RPostgreSQL)) >> >> ## load the PostgresSQL driver >> drv <- dbDriver("PostgreSQL") >> ## can't print result as it contains process id which changes >> print(summary(drv)) >> >> ## connect to the default db >> con <- dbConnect(drv, >> user=Sys.getenv("POSTGRES_USER"), >> password=Sys.getenv("POSTGRES_PASSWD"), >> host=Sys.getenv("POSTGRES_HOST"), >> dbname=Sys.getenv("POSTGRES_DATABASE")) >> >> >> # tests follow below ... >> >> ----------------------------------------------------------------------------- >> >> which allowed Brian and Uwe to test on their end as well. The actual tests >> are creating (and the removing) tables and ensuring things come out as >> identical() and/or same class() as the input. I still need to add one for >> transaction management. >> | 6) I've put a version of the revised sources I used to test on Windows | >> (and with updated documentation and unused files removed) at >> | | http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz >> | | I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I think these >> | days we should only support MySQL 5. >> >> As Debian maintainer for r-cran-rmysql I'd also be happy to test there. >> >> Dirk >> > ==================================================================================== > > La version fran?aise suit le texte anglais. > > ------------------------------------------------------------------------------------ > > This email may contain privileged and/or confidential information, and the > Bank of > Canada does not waive any related rights. Any distribution, use, or copying > of this > email or the information it contains by other than the intended recipient is > unauthorized. If you received this email in error please delete it > immediately from > your system and notify the sender promptly by email that you have done so. > ------------------------------------------------------------------------------------ > > Le pr?sent courriel peut contenir de l'information privil?gi?e ou > confidentielle. > La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute > diffusion, > utilisation ou copie de ce courriel ou des renseignements qu'il contient par > une > personne autre que le ou les destinataires d?sign?s est interdite. Si vous > recevez > ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer sans > d?lai ? > l'exp?diteur un message ?lectronique pour l'aviser que vous avez ?limin? de > votre > ordinateur toute copie du courriel re?u. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From pg||bert @end|ng |rom b@nk-b@nque-c@n@d@@c@ Mon Nov 17 17:01:08 2008 From: pg||bert @end|ng |rom b@nk-b@nque-c@n@d@@c@ (Paul Gilbert) Date: Mon, 17 Nov 2008 11:01:08 -0500 Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: References: <491CA2B0.6000204@vanderbilt.edu> <18720.17441.551053.30889@ron.nulle.part> <4921906E.5000103@bank-banque-canada.ca> Message-ID: <49219544.20402@bank-banque-canada.ca> Prof Brian Ripley wrote: > On Mon, 17 Nov 2008, Paul Gilbert wrote: > >> Dirk Eddelbuettel wrote: >>> On 16 November 2008 at 11:26, Prof Brian Ripley wrote: >>> | 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have >>> worked out a [ Almost: s/Edel/Eddel/ ] >>> >>> | way to have RPostgreSQL built on the main Windows package builder. >>> We | could try to do the same here, but none of us are happy with >>> distributing | a binary build that has no tests at all (as RMySQL >>> runs no actual | examples). So can we please have a test suite? You >>> will need to allow | the DBMS account, password and database name to >>> be set via environment | variables, as for RPostgreSQL. >>> >>> That was a leftover of me trying to get the Summer of Code whom I >>> mentored >>> for RPostgreSQL student to write 'test-driven' code. Which didn't >>> work so >>> well as he wrote code but few tests, but I ended up writing some >>> tests for >>> him. Kurt then had an issue with these tests running >>> _un_conditionally and >>> hence upsettting CRAN tests (that have no backend) so between Uwe, >>> Brian and >>> myself we came up with code where each file in tests/ starts as >>> >>> >>> ----------------------------------------------------------------------------- >>> >>> if ((Sys.getenv("POSTGRES_USER") != "") & >>> (Sys.getenv("POSTGRES_HOST") != "") & >>> (Sys.getenv("POSTGRES_DATABASE") != "")) { >> >> I've been setting this information in ~.pgpass (~/.my.cnf for MySQL) >> in Linux and understood it could be set in Windows >> %APPDATA%\postgresql\pgpass.conf and C:\my.cnf, although it may be >> machine specific rather than user specific in Windows. I believe >> setting this way is considered more secure, although security may not >> be the concern for package tests. I assume this option was >> considered. Is there a complication that makes it difficult? > > Yes, the DBMS account used for testing is not my own working account. > > I really don't see giving that having the settings in your file is any > more secure: they are even in a known place. Note that I at least do > not set a password this way. I guess the important security question is about the password, so how do you set the password for tests? Paul > >> >> Paul >> >>> >>> ## try to load our module and abort if this fails >>> stopifnot(require(RPostgreSQL)) >>> >>> ## load the PostgresSQL driver >>> drv <- dbDriver("PostgreSQL") >>> ## can't print result as it contains process id which changes >>> print(summary(drv)) >>> >>> ## connect to the default db >>> con <- dbConnect(drv, >>> user=Sys.getenv("POSTGRES_USER"), >>> password=Sys.getenv("POSTGRES_PASSWD"), >>> host=Sys.getenv("POSTGRES_HOST"), >>> dbname=Sys.getenv("POSTGRES_DATABASE")) >>> >>> >>> # tests follow below ... >>> >>> ----------------------------------------------------------------------------- >>> >>> >>> which allowed Brian and Uwe to test on their end as well. The actual >>> tests >>> are creating (and the removing) tables and ensuring things come out as >>> identical() and/or same class() as the input. I still need to add >>> one for >>> transaction management. >>> | 6) I've put a version of the revised sources I used to test on >>> Windows | (and with updated documentation and unused files removed) at >>> | | http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz >>> | | I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I think >>> these | days we should only support MySQL 5. >>> >>> As Debian maintainer for r-cran-rmysql I'd also be happy to test there. >>> >>> Dirk >>> >> ==================================================================================== >> >> >> La version fran?aise suit le texte anglais. >> >> ------------------------------------------------------------------------------------ >> >> >> This email may contain privileged and/or confidential information, and >> the Bank of >> Canada does not waive any related rights. Any distribution, use, or >> copying of this >> email or the information it contains by other than the intended >> recipient is >> unauthorized. If you received this email in error please delete it >> immediately from >> your system and notify the sender promptly by email that you have done >> so. >> ------------------------------------------------------------------------------------ >> >> >> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >> confidentielle. >> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. >> Toute diffusion, >> utilisation ou copie de ce courriel ou des renseignements qu'il >> contient par une >> personne autre que le ou les destinataires d?sign?s est interdite. Si >> vous recevez >> ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer >> sans d?lai ? >> l'exp?diteur un message ?lectronique pour l'aviser que vous avez >> ?limin? de votre >> ordinateur toute copie du courriel re?u. >> > ==================================================================================== La version fran?aise suit le texte anglais. ------------------------------------------------------------------------------------ This email may contain privileged and/or confidential in...{{dropped:26}} From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Mon Nov 17 17:14:29 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Mon, 17 Nov 2008 16:14:29 +0000 (GMT) Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: <49219544.20402@bank-banque-canada.ca> References: <491CA2B0.6000204@vanderbilt.edu> <18720.17441.551053.30889@ron.nulle.part> <4921906E.5000103@bank-banque-canada.ca> <49219544.20402@bank-banque-canada.ca> Message-ID: On Mon, 17 Nov 2008, Paul Gilbert wrote: > > > Prof Brian Ripley wrote: >> On Mon, 17 Nov 2008, Paul Gilbert wrote: >> >>> Dirk Eddelbuettel wrote: >>>> On 16 November 2008 at 11:26, Prof Brian Ripley wrote: >>>> | 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have worked >>>> out a [ Almost: s/Edel/Eddel/ ] >>>> >>>> | way to have RPostgreSQL built on the main Windows package builder. We >>>> | could try to do the same here, but none of us are happy with >>>> distributing | a binary build that has no tests at all (as RMySQL runs no >>>> actual | examples). So can we please have a test suite? You will need >>>> to allow | the DBMS account, password and database name to be set via >>>> environment | variables, as for RPostgreSQL. >>>> >>>> That was a leftover of me trying to get the Summer of Code whom I >>>> mentored >>>> for RPostgreSQL student to write 'test-driven' code. Which didn't work so >>>> well as he wrote code but few tests, but I ended up writing some tests >>>> for >>>> him. Kurt then had an issue with these tests running _un_conditionally >>>> and >>>> hence upsettting CRAN tests (that have no backend) so between Uwe, Brian >>>> and >>>> myself we came up with code where each file in tests/ starts as >>>> >>>> >>>> >>>> ----------------------------------------------------------------------------- >>>> if ((Sys.getenv("POSTGRES_USER") != "") & >>>> (Sys.getenv("POSTGRES_HOST") != "") & >>>> (Sys.getenv("POSTGRES_DATABASE") != "")) { >>> >>> I've been setting this information in ~.pgpass (~/.my.cnf for MySQL) in >>> Linux and understood it could be set in Windows >>> %APPDATA%\postgresql\pgpass.conf and C:\my.cnf, although it may be machine >>> specific rather than user specific in Windows. I believe setting this way >>> is considered more secure, although security may not be the concern for >>> package tests. I assume this option was considered. Is there a >>> complication that makes it difficult? >> >> Yes, the DBMS account used for testing is not my own working account. >> >> I really don't see giving that having the settings in your file is any more >> secure: they are even in a known place. Note that I at least do not set a >> password this way. > > I guess the important security question is about the password, so how do you > set the password for tests? Answering that is a security risk! > > Paul >> >>> >>> Paul >>> >>>> >>>> ## try to load our module and abort if this fails >>>> stopifnot(require(RPostgreSQL)) >>>> >>>> ## load the PostgresSQL driver >>>> drv <- dbDriver("PostgreSQL") >>>> ## can't print result as it contains process id which changes >>>> print(summary(drv)) >>>> >>>> ## connect to the default db >>>> con <- dbConnect(drv, >>>> user=Sys.getenv("POSTGRES_USER"), >>>> password=Sys.getenv("POSTGRES_PASSWD"), >>>> host=Sys.getenv("POSTGRES_HOST"), >>>> dbname=Sys.getenv("POSTGRES_DATABASE")) >>>> >>>> >>>> # tests follow below ... >>>> >>>> >>>> ----------------------------------------------------------------------------- >>>> >>>> which allowed Brian and Uwe to test on their end as well. The actual >>>> tests >>>> are creating (and the removing) tables and ensuring things come out as >>>> identical() and/or same class() as the input. I still need to add one >>>> for >>>> transaction management. >>>> | 6) I've put a version of the revised sources I used to test on Windows >>>> | (and with updated documentation and unused files removed) at >>>> | | http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz >>>> | | I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I think >>>> these | days we should only support MySQL 5. >>>> >>>> As Debian maintainer for r-cran-rmysql I'd also be happy to test there. >>>> >>>> Dirk >>>> >>> ==================================================================================== >>> >>> La version fran?aise suit le texte anglais. >>> >>> >>> ------------------------------------------------------------------------------------ >>> >>> This email may contain privileged and/or confidential information, and the >>> Bank of >>> Canada does not waive any related rights. Any distribution, use, or >>> copying of this >>> email or the information it contains by other than the intended recipient >>> is >>> unauthorized. If you received this email in error please delete it >>> immediately from >>> your system and notify the sender promptly by email that you have done so. >>> ------------------------------------------------------------------------------------ >>> >>> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >>> confidentielle. >>> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute >>> diffusion, >>> utilisation ou copie de ce courriel ou des renseignements qu'il contient >>> par une >>> personne autre que le ou les destinataires d?sign?s est interdite. Si vous >>> recevez >>> ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer >>> sans d?lai ? >>> l'exp?diteur un message ?lectronique pour l'aviser que vous avez ?limin? >>> de votre >>> ordinateur toute copie du courriel re?u. >>> >> > ==================================================================================== > > La version fran?aise suit le texte anglais. > > ------------------------------------------------------------------------------------ > > This email may contain privileged and/or confidential information, and the > Bank of > Canada does not waive any related rights. Any distribution, use, or copying > of this > email or the information it contains by other than the intended recipient is > unauthorized. If you received this email in error please delete it > immediately from > your system and notify the sender promptly by email that you have done so. > ------------------------------------------------------------------------------------ > > Le pr?sent courriel peut contenir de l'information privil?gi?e ou > confidentielle. > La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute > diffusion, > utilisation ou copie de ce courriel ou des renseignements qu'il contient par > une > personne autre que le ou les destinataires d?sign?s est interdite. Si vous > recevez > ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer sans > d?lai ? > l'exp?diteur un message ?lectronique pour l'aviser que vous avez ?limin? de > votre > ordinateur toute copie du courriel re?u. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From pg||bert @end|ng |rom b@nk-b@nque-c@n@d@@c@ Mon Nov 17 18:21:33 2008 From: pg||bert @end|ng |rom b@nk-b@nque-c@n@d@@c@ (Paul Gilbert) Date: Mon, 17 Nov 2008 12:21:33 -0500 Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: References: <491CA2B0.6000204@vanderbilt.edu> <18720.17441.551053.30889@ron.nulle.part> <4921906E.5000103@bank-banque-canada.ca> <49219544.20402@bank-banque-canada.ca> Message-ID: <4921A81D.9070300@bank-banque-canada.ca> Prof Brian Ripley wrote: > On Mon, 17 Nov 2008, Paul Gilbert wrote: > >> >> >> Prof Brian Ripley wrote: >>> On Mon, 17 Nov 2008, Paul Gilbert wrote: >>> >>>> Dirk Eddelbuettel wrote: >>>>> On 16 November 2008 at 11:26, Prof Brian Ripley wrote: >>>>> | 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have >>>>> worked out a [ Almost: s/Edel/Eddel/ ] >>>>> >>>>> | way to have RPostgreSQL built on the main Windows package >>>>> builder. We | could try to do the same here, but none of us are >>>>> happy with distributing | a binary build that has no tests at all >>>>> (as RMySQL runs no actual | examples). So can we please have a >>>>> test suite? You will need to allow | the DBMS account, password >>>>> and database name to be set via environment | variables, as for >>>>> RPostgreSQL. >>>>> >>>>> That was a leftover of me trying to get the Summer of Code whom I >>>>> mentored >>>>> for RPostgreSQL student to write 'test-driven' code. Which didn't >>>>> work so >>>>> well as he wrote code but few tests, but I ended up writing some >>>>> tests for >>>>> him. Kurt then had an issue with these tests running >>>>> _un_conditionally and >>>>> hence upsettting CRAN tests (that have no backend) so between Uwe, >>>>> Brian and >>>>> myself we came up with code where each file in tests/ starts as >>>>> >>>>> >>>>> >>>>> ----------------------------------------------------------------------------- >>>>> if ((Sys.getenv("POSTGRES_USER") != "") & >>>>> (Sys.getenv("POSTGRES_HOST") != "") & >>>>> (Sys.getenv("POSTGRES_DATABASE") != "")) { >>>> >>>> I've been setting this information in ~.pgpass (~/.my.cnf for MySQL) >>>> in Linux and understood it could be set in Windows >>>> %APPDATA%\postgresql\pgpass.conf and C:\my.cnf, although it may be >>>> machine specific rather than user specific in Windows. I believe >>>> setting this way is considered more secure, although security may >>>> not be the concern for package tests. I assume this option was >>>> considered. Is there a complication that makes it difficult? >>> >>> Yes, the DBMS account used for testing is not my own working account. >>> >>> I really don't see giving that having the settings in your file is >>> any more secure: they are even in a known place. Note that I at >>> least do not set a password this way. >> >> I guess the important security question is about the password, so how >> do you set the password for tests? > > Answering that is a security risk! Just to be clear, I meant what method do you use for setting it, not, what do you set it to. Is that considered a security risk in Windows? Paul > >> >> Paul >>> >>>> >>>> Paul >>>> >>>>> >>>>> ## try to load our module and abort if this fails >>>>> stopifnot(require(RPostgreSQL)) >>>>> >>>>> ## load the PostgresSQL driver >>>>> drv <- dbDriver("PostgreSQL") >>>>> ## can't print result as it contains process id which changes >>>>> print(summary(drv)) >>>>> >>>>> ## connect to the default db >>>>> con <- dbConnect(drv, >>>>> user=Sys.getenv("POSTGRES_USER"), >>>>> password=Sys.getenv("POSTGRES_PASSWD"), >>>>> host=Sys.getenv("POSTGRES_HOST"), >>>>> dbname=Sys.getenv("POSTGRES_DATABASE")) >>>>> >>>>> >>>>> # tests follow below ... >>>>> >>>>> >>>>> ----------------------------------------------------------------------------- >>>>> >>>>> which allowed Brian and Uwe to test on their end as well. The >>>>> actual tests >>>>> are creating (and the removing) tables and ensuring things come out as >>>>> identical() and/or same class() as the input. I still need to add >>>>> one for >>>>> transaction management. >>>>> | 6) I've put a version of the revised sources I used to test on >>>>> Windows | (and with updated documentation and unused files removed) at >>>>> | | http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz >>>>> | | I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I >>>>> think these | days we should only support MySQL 5. >>>>> >>>>> As Debian maintainer for r-cran-rmysql I'd also be happy to test >>>>> there. >>>>> >>>>> Dirk >>>>> >>>> ==================================================================================== >>>> >>>> La version fran?aise suit le texte anglais. >>>> >>>> >>>> ------------------------------------------------------------------------------------ >>>> >>>> This email may contain privileged and/or confidential information, >>>> and the Bank of >>>> Canada does not waive any related rights. Any distribution, use, or >>>> copying of this >>>> email or the information it contains by other than the intended >>>> recipient is >>>> unauthorized. If you received this email in error please delete it >>>> immediately from >>>> your system and notify the sender promptly by email that you have >>>> done so. >>>> ------------------------------------------------------------------------------------ >>>> >>>> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >>>> confidentielle. >>>> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. >>>> Toute diffusion, >>>> utilisation ou copie de ce courriel ou des renseignements qu'il >>>> contient par une >>>> personne autre que le ou les destinataires d?sign?s est interdite. >>>> Si vous recevez >>>> ce courriel par erreur, veuillez le supprimer imm?diatement et >>>> envoyer sans d?lai ? >>>> l'exp?diteur un message ?lectronique pour l'aviser que vous avez >>>> ?limin? de votre >>>> ordinateur toute copie du courriel re?u. >>>> >>> >> ==================================================================================== >> >> >> La version fran?aise suit le texte anglais. >> >> ------------------------------------------------------------------------------------ >> >> >> This email may contain privileged and/or confidential information, and >> the Bank of >> Canada does not waive any related rights. Any distribution, use, or >> copying of this >> email or the information it contains by other than the intended >> recipient is >> unauthorized. If you received this email in error please delete it >> immediately from >> your system and notify the sender promptly by email that you have done >> so. >> ------------------------------------------------------------------------------------ >> >> >> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >> confidentielle. >> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. >> Toute diffusion, >> utilisation ou copie de ce courriel ou des renseignements qu'il >> contient par une >> personne autre que le ou les destinataires d?sign?s est interdite. Si >> vous recevez >> ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer >> sans d?lai ? >> l'exp?diteur un message ?lectronique pour l'aviser que vous avez >> ?limin? de votre >> ordinateur toute copie du courriel re?u. >> > ==================================================================================== La version fran?aise suit le texte anglais. ------------------------------------------------------------------------------------ This email may contain privileged and/or confidential in...{{dropped:26}} From ||gge@ @end|ng |rom @t@t|@t|k@tu-dortmund@de Tue Nov 18 10:14:03 2008 From: ||gge@ @end|ng |rom @t@t|@t|k@tu-dortmund@de (Uwe Ligges) Date: Tue, 18 Nov 2008 10:14:03 +0100 Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: <4921A81D.9070300@bank-banque-canada.ca> References: <491CA2B0.6000204@vanderbilt.edu> <18720.17441.551053.30889@ron.nulle.part> <4921906E.5000103@bank-banque-canada.ca> <49219544.20402@bank-banque-canada.ca> <4921A81D.9070300@bank-banque-canada.ca> Message-ID: <4922875B.9060601@statistik.tu-dortmund.de> Paul Gilbert wrote: > > > Prof Brian Ripley wrote: >> On Mon, 17 Nov 2008, Paul Gilbert wrote: >> >>> >>> >>> Prof Brian Ripley wrote: >>>> On Mon, 17 Nov 2008, Paul Gilbert wrote: >>>> >>>>> Dirk Eddelbuettel wrote: >>>>>> On 16 November 2008 at 11:26, Prof Brian Ripley wrote: >>>>>> | 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have >>>>>> worked out a [ Almost: s/Edel/Eddel/ ] >>>>>> >>>>>> | way to have RPostgreSQL built on the main Windows package >>>>>> builder. We | could try to do the same here, but none of us are >>>>>> happy with distributing | a binary build that has no tests at all >>>>>> (as RMySQL runs no actual | examples). So can we please have a >>>>>> test suite? You will need to allow | the DBMS account, password >>>>>> and database name to be set via environment | variables, as for >>>>>> RPostgreSQL. >>>>>> >>>>>> That was a leftover of me trying to get the Summer of Code whom I >>>>>> mentored >>>>>> for RPostgreSQL student to write 'test-driven' code. Which didn't >>>>>> work so >>>>>> well as he wrote code but few tests, but I ended up writing some >>>>>> tests for >>>>>> him. Kurt then had an issue with these tests running >>>>>> _un_conditionally and >>>>>> hence upsettting CRAN tests (that have no backend) so between Uwe, >>>>>> Brian and >>>>>> myself we came up with code where each file in tests/ starts as >>>>>> >>>>>> >>>>>> >>>>>> ----------------------------------------------------------------------------- >>>>>> if ((Sys.getenv("POSTGRES_USER") != "") & >>>>>> (Sys.getenv("POSTGRES_HOST") != "") & >>>>>> (Sys.getenv("POSTGRES_DATABASE") != "")) { >>>>> >>>>> I've been setting this information in ~.pgpass (~/.my.cnf for >>>>> MySQL) in Linux and understood it could be set in Windows >>>>> %APPDATA%\postgresql\pgpass.conf and C:\my.cnf, although it may be >>>>> machine specific rather than user specific in Windows. I believe >>>>> setting this way is considered more secure, although security may >>>>> not be the concern for package tests. I assume this option was >>>>> considered. Is there a complication that makes it difficult? >>>> >>>> Yes, the DBMS account used for testing is not my own working account. >>>> >>>> I really don't see giving that having the settings in your file is >>>> any more secure: they are even in a known place. Note that I at >>>> least do not set a password this way. >>> >>> I guess the important security question is about the password, so how >>> do you set the password for tests? >> >> Answering that is a security risk! > > Just to be clear, I meant what method do you use for setting it, not, > what do you set it to. Is that considered a security risk in Windows? Folks, on the CRAN-Windows-Builder machine, the databases are just for the checks, no other data is stored and only connections from localhost are permitted, hence don't worry about passwords. Best, Uwe Ligges > Paul >> >>> >>> Paul >>>> >>>>> >>>>> Paul >>>>> >>>>>> >>>>>> ## try to load our module and abort if this fails >>>>>> stopifnot(require(RPostgreSQL)) >>>>>> >>>>>> ## load the PostgresSQL driver >>>>>> drv <- dbDriver("PostgreSQL") >>>>>> ## can't print result as it contains process id which changes >>>>>> print(summary(drv)) >>>>>> >>>>>> ## connect to the default db >>>>>> con <- dbConnect(drv, >>>>>> user=Sys.getenv("POSTGRES_USER"), >>>>>> password=Sys.getenv("POSTGRES_PASSWD"), >>>>>> host=Sys.getenv("POSTGRES_HOST"), >>>>>> dbname=Sys.getenv("POSTGRES_DATABASE")) >>>>>> >>>>>> >>>>>> # tests follow below ... >>>>>> >>>>>> >>>>>> ----------------------------------------------------------------------------- >>>>>> >>>>>> which allowed Brian and Uwe to test on their end as well. The >>>>>> actual tests >>>>>> are creating (and the removing) tables and ensuring things come >>>>>> out as >>>>>> identical() and/or same class() as the input. I still need to add >>>>>> one for >>>>>> transaction management. >>>>>> | 6) I've put a version of the revised sources I used to test on >>>>>> Windows | (and with updated documentation and unused files >>>>>> removed) at >>>>>> | | http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz >>>>>> | | I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I >>>>>> think these | days we should only support MySQL 5. >>>>>> >>>>>> As Debian maintainer for r-cran-rmysql I'd also be happy to test >>>>>> there. >>>>>> >>>>>> Dirk >>>>>> >>>>> ==================================================================================== >>>>> >>>>> La version fran?aise suit le texte anglais. >>>>> >>>>> >>>>> ------------------------------------------------------------------------------------ >>>>> >>>>> This email may contain privileged and/or confidential information, >>>>> and the Bank of >>>>> Canada does not waive any related rights. Any distribution, use, or >>>>> copying of this >>>>> email or the information it contains by other than the intended >>>>> recipient is >>>>> unauthorized. If you received this email in error please delete it >>>>> immediately from >>>>> your system and notify the sender promptly by email that you have >>>>> done so. >>>>> ------------------------------------------------------------------------------------ >>>>> >>>>> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >>>>> confidentielle. >>>>> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. >>>>> Toute diffusion, >>>>> utilisation ou copie de ce courriel ou des renseignements qu'il >>>>> contient par une >>>>> personne autre que le ou les destinataires d?sign?s est interdite. >>>>> Si vous recevez >>>>> ce courriel par erreur, veuillez le supprimer imm?diatement et >>>>> envoyer sans d?lai ? >>>>> l'exp?diteur un message ?lectronique pour l'aviser que vous avez >>>>> ?limin? de votre >>>>> ordinateur toute copie du courriel re?u. >>>>> >>>> >>> ==================================================================================== >>> >>> >>> La version fran?aise suit le texte anglais. >>> >>> ------------------------------------------------------------------------------------ >>> >>> >>> This email may contain privileged and/or confidential information, >>> and the Bank of >>> Canada does not waive any related rights. Any distribution, use, or >>> copying of this >>> email or the information it contains by other than the intended >>> recipient is >>> unauthorized. If you received this email in error please delete it >>> immediately from >>> your system and notify the sender promptly by email that you have >>> done so. >>> ------------------------------------------------------------------------------------ >>> >>> >>> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >>> confidentielle. >>> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. >>> Toute diffusion, >>> utilisation ou copie de ce courriel ou des renseignements qu'il >>> contient par une >>> personne autre que le ou les destinataires d?sign?s est interdite. Si >>> vous recevez >>> ce courriel par erreur, veuillez le supprimer imm?diatement et >>> envoyer sans d?lai ? >>> l'exp?diteur un message ?lectronique pour l'aviser que vous avez >>> ?limin? de votre >>> ordinateur toute copie du courriel re?u. >>> >> > ==================================================================================== > > > La version fran?aise suit le texte anglais. > > ------------------------------------------------------------------------------------ > > > This email may contain privileged and/or confidential information, and > the Bank of > Canada does not waive any related rights. Any distribution, use, or > copying of this > email or the information it contains by other than the intended > recipient is > unauthorized. If you received this email in error please delete it > immediately from > your system and notify the sender promptly by email that you have done so. > ------------------------------------------------------------------------------------ > > > Le pr?sent courriel peut contenir de l'information privil?gi?e ou > confidentielle. > La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute > diffusion, > utilisation ou copie de ce courriel ou des renseignements qu'il contient > par une > personne autre que le ou les destinataires d?sign?s est interdite. Si > vous recevez > ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer > sans d?lai ? > l'exp?diteur un message ?lectronique pour l'aviser que vous avez ?limin? > de votre > ordinateur toute copie du courriel re?u. > From pg||bert @end|ng |rom b@nk-b@nque-c@n@d@@c@ Tue Nov 18 23:36:05 2008 From: pg||bert @end|ng |rom b@nk-b@nque-c@n@d@@c@ (Paul Gilbert) Date: Tue, 18 Nov 2008 17:36:05 -0500 Subject: [R-sig-DB] RMySQL release candidate 0-7.0 In-Reply-To: <4922875B.9060601@statistik.tu-dortmund.de> References: <491CA2B0.6000204@vanderbilt.edu> <18720.17441.551053.30889@ron.nulle.part> <4921906E.5000103@bank-banque-canada.ca> <49219544.20402@bank-banque-canada.ca> <4921A81D.9070300@bank-banque-canada.ca> <4922875B.9060601@statistik.tu-dortmund.de> Message-ID: <49234355.4030303@bank-banque-canada.ca> Uwe Ligges wrote: > > > Paul Gilbert wrote: > >> >> >> Prof Brian Ripley wrote: >> >>> On Mon, 17 Nov 2008, Paul Gilbert wrote: >>> >>>> >>>> >>>> Prof Brian Ripley wrote: >>>> >>>>> On Mon, 17 Nov 2008, Paul Gilbert wrote: >>>>> >>>>>> Dirk Eddelbuettel wrote: >>>>>> >>>>>>> On 16 November 2008 at 11:26, Prof Brian Ripley wrote: >>>>>>> | 5) Uwe Ligges and I and Dirk Edelbuettel (as maintainer) have >>>>>>> worked out a [ Almost: s/Edel/Eddel/ ] >>>>>>> >>>>>>> | way to have RPostgreSQL built on the main Windows package >>>>>>> builder. We | could try to do the same here, but none of us are >>>>>>> happy with distributing | a binary build that has no tests at all >>>>>>> (as RMySQL runs no actual | examples). So can we please have a >>>>>>> test suite? You will need to allow | the DBMS account, password >>>>>>> and database name to be set via environment | variables, as for >>>>>>> RPostgreSQL. >>>>>>> >>>>>>> That was a leftover of me trying to get the Summer of Code whom I >>>>>>> mentored >>>>>>> for RPostgreSQL student to write 'test-driven' code. Which didn't >>>>>>> work so >>>>>>> well as he wrote code but few tests, but I ended up writing some >>>>>>> tests for >>>>>>> him. Kurt then had an issue with these tests running >>>>>>> _un_conditionally and >>>>>>> hence upsettting CRAN tests (that have no backend) so between >>>>>>> Uwe, Brian and >>>>>>> myself we came up with code where each file in tests/ starts as >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----------------------------------------------------------------------------- >>>>>>> if ((Sys.getenv("POSTGRES_USER") != "") & >>>>>>> (Sys.getenv("POSTGRES_HOST") != "") & >>>>>>> (Sys.getenv("POSTGRES_DATABASE") != "")) { >>>>>> >>>>>> >>>>>> I've been setting this information in ~.pgpass (~/.my.cnf for >>>>>> MySQL) in Linux and understood it could be set in Windows >>>>>> %APPDATA%\postgresql\pgpass.conf and C:\my.cnf, although it may be >>>>>> machine specific rather than user specific in Windows. I believe >>>>>> setting this way is considered more secure, although security may >>>>>> not be the concern for package tests. I assume this option was >>>>>> considered. Is there a complication that makes it difficult? >>>>> >>>>> >>>>> Yes, the DBMS account used for testing is not my own working account. >>>>> >>>>> I really don't see giving that having the settings in your file is >>>>> any more secure: they are even in a known place. Note that I at >>>>> least do not set a password this way. >>>> >>>> >>>> I guess the important security question is about the password, so >>>> how do you set the password for tests? >>> >>> >>> Answering that is a security risk! >> >> >> Just to be clear, I meant what method do you use for setting it, not, >> what do you set it to. Is that considered a security risk in Windows? > > > > Folks, on the CRAN-Windows-Builder machine, the databases are just for > the checks, no other data is stored and only connections from localhost > are permitted, hence don't worry about passwords. Ok, but the problem is that we also need to check packages on our own systems, where passwords may be in force and the server may not be localhost, so the mechanism in the tests/ files needs to allow different possibilities. I can specify things with environment variables, in fact I used that as the mechanism originally, but switched to the config files because it seemed both easier and more secure, at least for MySQL and PostgreSQL. (SQLite does not seem to bother with these details, and I have not used Oracle yet.) In either case it seems both approaches imply some setup on the testing machine if tests are to be run rather than just be skipped. I think you will agree we would prefer to avoid special setup, and I hope you agree it would be better to run tests rather than skip them. One way to avoid special setup is if some defaults work on the testing machines. Then nothing special needs to be set. It would be especial nice if the same defaults worked on different test platforms and for different database back ends. Can defaults like Sys.info()[["nodename"]]/"test"/Sys.info()[["user"]]/"" be used for the host/db/user/passwd on the CRAN-Windows-Builder machine, and other CRAN testing platforms? Another possibility for the default host is "localhost", which is probably more secure since network access to the db needs to be allowed if nodename is used. However, there is still a problem of potential conflicts on database "test" if parallel testing occurs. (I've had this problem already.) It would be better if "test" were replaced by a pid specific db, but this requires the userid to have database create rights. (And it is possible this kind of mechanism will work better with environment varibles than with the config files.) To summarize: 1/ Are we trying to define a mechanism that usually runs the tests or usually skips them? I don't like if ((Sys.getenv("POSTGRES_USER") != "") & (Sys.getenv("POSTGRES_HOST") != "") & (Sys.getenv("POSTGRES_DATABASE") != "")) { tests } because it will skip tests unless there is special setup done correctly, so it does not catch mistakes well. My mechanism using the database config files is not better, since it fails if the config file is not set, so I would need to wrap the connection with try() and skip tests if it fails. I think a mechanism like if ((Sys.getenv("SKIP_POSTGRES") == "")) { tests } would be better in this regard. It would also clearly separate the mechanism for deciding if the tests should be run from the mechanism for determining details like the userid. 2/ It would be nice if a similar mechanism worked for most database backends and most packages. This suggest trying to use some standard defaults with accounts enabled on the test machine databases (or at least standard mechanisms for determining this information). 3/ It seems fairly important that tests/ files can run easily with the same mechanism on package developers own systems, and that suggests a preference for a fairly secure mechanism (especial for passwords). 4/ It would be nice if tests did not collide. Best, Paul > > Best, > Uwe Ligges > > > > > > >> Paul >> >>> >>>> >>>> Paul >>>> >>>>> >>>>>> >>>>>> Paul >>>>>> >>>>>>> >>>>>>> ## try to load our module and abort if this fails >>>>>>> stopifnot(require(RPostgreSQL)) >>>>>>> >>>>>>> ## load the PostgresSQL driver >>>>>>> drv <- dbDriver("PostgreSQL") >>>>>>> ## can't print result as it contains process id which changes >>>>>>> print(summary(drv)) >>>>>>> >>>>>>> ## connect to the default db >>>>>>> con <- dbConnect(drv, >>>>>>> user=Sys.getenv("POSTGRES_USER"), >>>>>>> password=Sys.getenv("POSTGRES_PASSWD"), >>>>>>> host=Sys.getenv("POSTGRES_HOST"), >>>>>>> dbname=Sys.getenv("POSTGRES_DATABASE")) >>>>>>> >>>>>>> >>>>>>> # tests follow below ... >>>>>>> >>>>>>> >>>>>>> ----------------------------------------------------------------------------- >>>>>>> >>>>>>> which allowed Brian and Uwe to test on their end as well. The >>>>>>> actual tests >>>>>>> are creating (and the removing) tables and ensuring things come >>>>>>> out as >>>>>>> identical() and/or same class() as the input. I still need to >>>>>>> add one for >>>>>>> transaction management. >>>>>>> | 6) I've put a version of the revised sources I used to test on >>>>>>> Windows | (and with updated documentation and unused files >>>>>>> removed) at >>>>>>> | | http://www.stats.ox.ac.uk/pub/R/RMySQL_0.7-1.tar.gz >>>>>>> | | I tested MySQL 5.0.67 on Windows and 5.0.45 on Linux, and I >>>>>>> think these | days we should only support MySQL 5. >>>>>>> >>>>>>> As Debian maintainer for r-cran-rmysql I'd also be happy to test >>>>>>> there. >>>>>>> >>>>>>> Dirk >>>>>>> >>>>>> ==================================================================================== >>>>>> >>>>>> La version fran?aise suit le texte anglais. >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------------ >>>>>> >>>>>> This email may contain privileged and/or confidential information, >>>>>> and the Bank of >>>>>> Canada does not waive any related rights. Any distribution, use, >>>>>> or copying of this >>>>>> email or the information it contains by other than the intended >>>>>> recipient is >>>>>> unauthorized. If you received this email in error please delete it >>>>>> immediately from >>>>>> your system and notify the sender promptly by email that you have >>>>>> done so. >>>>>> ------------------------------------------------------------------------------------ >>>>>> >>>>>> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >>>>>> confidentielle. >>>>>> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. >>>>>> Toute diffusion, >>>>>> utilisation ou copie de ce courriel ou des renseignements qu'il >>>>>> contient par une >>>>>> personne autre que le ou les destinataires d?sign?s est interdite. >>>>>> Si vous recevez >>>>>> ce courriel par erreur, veuillez le supprimer imm?diatement et >>>>>> envoyer sans d?lai ? >>>>>> l'exp?diteur un message ?lectronique pour l'aviser que vous avez >>>>>> ?limin? de votre >>>>>> ordinateur toute copie du courriel re?u. >>>>>> >>>>> >>>> ==================================================================================== >>>> >>>> >>>> La version fran?aise suit le texte anglais. >>>> >>>> ------------------------------------------------------------------------------------ >>>> >>>> >>>> This email may contain privileged and/or confidential information, >>>> and the Bank of >>>> Canada does not waive any related rights. Any distribution, use, or >>>> copying of this >>>> email or the information it contains by other than the intended >>>> recipient is >>>> unauthorized. If you received this email in error please delete it >>>> immediately from >>>> your system and notify the sender promptly by email that you have >>>> done so. >>>> ------------------------------------------------------------------------------------ >>>> >>>> >>>> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >>>> confidentielle. >>>> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. >>>> Toute diffusion, >>>> utilisation ou copie de ce courriel ou des renseignements qu'il >>>> contient par une >>>> personne autre que le ou les destinataires d?sign?s est interdite. >>>> Si vous recevez >>>> ce courriel par erreur, veuillez le supprimer imm?diatement et >>>> envoyer sans d?lai ? >>>> l'exp?diteur un message ?lectronique pour l'aviser que vous avez >>>> ?limin? de votre >>>> ordinateur toute copie du courriel re?u. >>>> >>> >> ==================================================================================== >> >> >> La version fran?aise suit le texte anglais. >> >> ------------------------------------------------------------------------------------ >> >> >> This email may contain privileged and/or confidential information, and >> the Bank of >> Canada does not waive any related rights. Any distribution, use, or >> copying of this >> email or the information it contains by other than the intended >> recipient is >> unauthorized. If you received this email in error please delete it >> immediately from >> your system and notify the sender promptly by email that you have done >> so. >> ------------------------------------------------------------------------------------ >> >> >> Le pr?sent courriel peut contenir de l'information privil?gi?e ou >> confidentielle. >> La Banque du Canada ne renonce pas aux droits qui s'y rapportent. >> Toute diffusion, >> utilisation ou copie de ce courriel ou des renseignements qu'il >> contient par une >> personne autre que le ou les destinataires d?sign?s est interdite. Si >> vous recevez >> ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer >> sans d?lai ? >> l'exp?diteur un message ?lectronique pour l'aviser que vous avez >> ?limin? de votre >> ordinateur toute copie du courriel re?u. >> ==================================================================================== La version fran?aise suit le texte anglais. ------------------------------------------------------------------------------------ This email may contain privileged and/or confidential in...{{dropped:26}} From ye@r@ @end|ng |rom beton@ph@cz Wed Dec 3 16:40:34 2008 From: ye@r@ @end|ng |rom beton@ph@cz (Abrachinsky Westin) Date: Wed, 03 Dec 2008 15:40:34 +0000 Subject: [R-sig-DB] !SPAM: Christtmas gift idea! Message-ID: <5640117947.20081203153644@betonsph.cz> Christmas gift idea! Do you love yyour girlfriend? http://cid-08f8a5ddf607bb77.spaces.live.com/blog/cns!8F8A5DDF607BB77!106.entry Not the fear lie on me every moment that i might prerogative royal and absolute power, in a letter in this hole, is itself being gradually eaten i am highly pleased. All this befits thee, o lord bellows. And, as i knelt there on the hearth,. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jo@ephmon@d|cM|||er @end|ng |rom pchte@m@com Wed Dec 3 18:57:24 2008 From: Jo@ephmon@d|cM|||er @end|ng |rom pchte@m@com (Richard Wilson) Date: Wed, 3 Dec 2008 16:57:24 -0100 Subject: [R-sig-DB] !SPAM: Proven to enlarge and lengthen Message-ID: <805y133c.8111596@pchteam.com> The world's proven Male enlargement formula - endorsed by healthcare professionals worldwide: POWER Gain+ + Used by thousands of Men, The world's proven Male enlargement formula - endorsed by healthcare professionals worldwide: POWER Gain+ + Used by thousands of Men, http://bimuhfeb.com/ From Ch@ngHo|comb @end|ng |rom cnn@com Wed Dec 3 17:05:11 2008 From: Ch@ngHo|comb @end|ng |rom cnn@com (Mesdames, vous allez adorer) Date: Wed, 03 Dec 2008 11:05:11 -0500 Subject: [R-sig-DB] !SPAM: Re: qui changent la vie des pilules a base de plantes, seulement quelques clics de souris Message-ID: <10158.deductible@cobweb> An HTML attachment was scrubbed... URL: From r-sig-db m@iii@g oii st@t@m@th@ethz@ch Wed Dec 3 17:26:46 2008 From: r-sig-db m@iii@g oii st@t@m@th@ethz@ch (r-sig-db m@iii@g oii st@t@m@th@ethz@ch) Date: Wed, 3 Dec 2008 17:26:46 +0100 Subject: [R-sig-DB] !SPAM: Your order Message-ID: <200812031626.mB3GQk6F003684@hypatia.math.ethz.ch> An HTML attachment was scrubbed... URL: From Jo@qu|n @end|ng |rom m@n@w@tu@com Wed Dec 3 19:02:29 2008 From: Jo@qu|n @end|ng |rom m@n@w@tu@com (Edna Conner) Date: Wed, 3 Dec 2008 21:02:29 +0300 Subject: [R-sig-DB] !SPAM: Die Frauen werden Sie vergoettern! Message-ID: <01c9558a$7398a080$47775a50@Joaquin> Haben Sie das Gefuehl, dass Ihre Potenz waehrend des Sex nachlaesst? Kommen Sie zu frueh? Es lauft im Bett nicht mehr wie frueher? Oder haetten Sie einfach gerne laengeren und intensiveren Sex? Das Leben ist zu kurz - geniessen Sie das in vollen Zuegen. Mit Geld kann man nicht alles kaufen! Die Potenz und ueber 30 Minuten Standhaftigkeit schon! Mit unserem Produkt vergessen die Potenzprobleme und haben wieder Spass am Sex. Wir haben genau das Richtige fuer Sie! Das Geld kommt und geht - unvergessliches Sex Erlebnis bleibt! Bestellen Sie jetzt und vergessen Sie Ihre Enttaeuschungen, anhaltende Versagensaengste und wiederholte peinliche Situationen! Jetzt bestellen und nachste Woche erhalten - 12 Tb. umsonst zum Weihnachten! http://selectshell.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From W|||@rdpo||@rdNe@| @end|ng |rom cot@detro|t@org Wed Dec 3 23:16:58 2008 From: W|||@rdpo||@rdNe@| @end|ng |rom cot@detro|t@org (Bob Terry) Date: Wed, 3 Dec 2008 20:16:58 -0200 Subject: [R-sig-DB] !SPAM: You are what you wear Message-ID: <3608971782.20081111195499@cotsdetroit.org> With more than 50 luxury famous brands to choose from, and incredible prices starting from just $39 - you simply cannot go wrong. http://sojsanal.cn/ From r-sig-db m@iii@g oii st@t@m@th@ethz@ch Wed Dec 3 19:32:19 2008 From: r-sig-db m@iii@g oii st@t@m@th@ethz@ch (r-sig-db m@iii@g oii st@t@m@th@ethz@ch) Date: Wed, 3 Dec 2008 19:32:19 +0100 Subject: [R-sig-DB] !SPAM: Re: Order status Message-ID: <200812031832.mB3IWJIH013220@hypatia.math.ethz.ch> An HTML attachment was scrubbed... URL: From r-sig-db m@iii@g oii st@t@m@th@ethz@ch Wed Dec 3 19:45:49 2008 From: r-sig-db m@iii@g oii st@t@m@th@ethz@ch (r-sig-db m@iii@g oii st@t@m@th@ethz@ch) Date: Wed, 3 Dec 2008 19:45:49 +0100 Subject: [R-sig-DB] !SPAM: RE: Message Message-ID: <200812031845.mB3IjnSB021966@hypatia.math.ethz.ch> An HTML attachment was scrubbed... URL: From o|ubuguryveyj @end|ng |rom @n@||-m@||@net Wed Dec 3 21:04:23 2008 From: o|ubuguryveyj @end|ng |rom @n@||-m@||@net (Cuij Casino) Date: Wed, 03 Dec 2008 13:04:23 -0700 Subject: [R-sig-DB] !SPAM: Faire de l'argent en ligne - Plus de 500 euro/jour! cldi Message-ID: <9C428FBB.ECC43B07@snail-mail.net> An HTML attachment was scrubbed... URL: From T@y|orpo|nc@reP@r@on@ @end|ng |rom @pp|e|n@|der@com Wed Dec 3 15:35:38 2008 From: T@y|orpo|nc@reP@r@on@ @end|ng |rom @pp|e|n@|der@com (Drew Greer) Date: Wed, 3 Dec 2008 17:35:38 +0300 Subject: [R-sig-DB] !SPAM: Award: We are waiting for your nomination Message-ID: <1382559120.20081111127451@appleinsider.com> No Exams/Books/Tests/Interview/classes 100% No Pre-School qua|ification r?quired! ------------------------------ Inside USA: 1-302-442-4070 0utside USA: +1-302-442-4070 ------------------------------ Bacheelor, Degree, MasteerMBA, PhDD (non ?ccredited) av?ilabIe in the Field of your choic? so you can evenn bec?me a doct?r and receive All the benefits That com?s with it! Ple?se leav? beelow 3 I?fo in Voicemail: 1) Your ??me 2) Yourr country 3) Your phone no. [please ?nclud? Country?odee] Call Now!! 24-hours a day, 7-Days a We?k wa?ting For your call ------------------------------ Inside USA: 1-302-442-4070 0utside USA: +1-302-442-4070 ------------------------------ Our Staff will get back to You in 1-3 workiing dayys From r-sig-db m@iii@g oii st@t@m@th@ethz@ch Wed Dec 3 20:48:39 2008 From: r-sig-db m@iii@g oii st@t@m@th@ethz@ch (r-sig-db m@iii@g oii st@t@m@th@ethz@ch) Date: Wed, 3 Dec 2008 20:48:39 +0100 Subject: [R-sig-DB] !SPAM: Your order Message-ID: <200812031948.mB3JmdcG027511@hypatia.math.ethz.ch> An HTML attachment was scrubbed... URL: From r-sig-db m@iii@g oii st@t@m@th@ethz@ch Wed Dec 3 21:02:01 2008 From: r-sig-db m@iii@g oii st@t@m@th@ethz@ch (r-sig-db m@iii@g oii st@t@m@th@ethz@ch) Date: Wed, 3 Dec 2008 21:02:01 +0100 Subject: [R-sig-DB] !SPAM: Re: Order status Message-ID: <200812032002.mB3K21gm002851@hypatia.math.ethz.ch> An HTML attachment was scrubbed... URL: From @oowonx @end|ng |rom b@rtb@ggett@com Wed Dec 3 22:38:06 2008 From: @oowonx @end|ng |rom b@rtb@ggett@com (=?windows-1251?B?QWphaSBCdXJnZXNz?=) Date: Wed, 03 Dec 2008 21:38:06 -0000 Subject: [R-sig-DB] =?windows-1251?q?!SPAM=3A_Your_private_xxx_life_willbe?= =?windows-1251?q?_so_good_that_you_wont_help_from_boasting_it=2E?= Message-ID: <8eef019dbfb4$d961e5c1$a434721d@bartbaggett.com> Canadian *** Pharmacy #1 Internet Inline Drugstore Viagra Our price $1.15 Cialis Our price $1.99 Viagra Professional Our price $3.73 Cialis Professionsl Our price $4.17 Viagra Super Active Our price $2.82 Cialis Super Active Our price $3.66 Levitra Our price $2.93 Viagra Soft Tabs Our price $1.64 Cialis Soft Tabs Our price $3.51 And more... Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: From F@u@t|nobrow@eK|nney @end|ng |rom revenue@c|ence@com Thu Dec 4 21:50:01 2008 From: F@u@t|nobrow@eK|nney @end|ng |rom revenue@c|ence@com (Tanner Sharpe) Date: Thu, 4 Dec 2008 10:50:01 -1000 Subject: [R-sig-DB] !SPAM: Re: unbelievable prices on incredible luxury Message-ID: <1438672442.20081111156462@revenuescience.com> Speed up to the nightclub with a diamond studded luxury watch strapped around your wrist, and watch everybody stare in awe. http://nofrebez.cn/ From @r|n|v@@p @end|ng |rom b@you@com Thu Dec 4 01:29:31 2008 From: @r|n|v@@p @end|ng |rom b@you@com (=?windows-1251?B?QWpheSBCZWNr?=) Date: Thu, 04 Dec 2008 00:29:31 -0000 Subject: [R-sig-DB] !SPAM: Your confirmation reqired Message-ID: <4bb2019db922$1be583dd$439f7dc9@bayou.com> Viagra Our price $1.15 Cialis Our price $1.99 Viagra Professional Our price $3.73 Cialis Professionsl Our price $4.17 Viagra Super Active Our price $2.82 Cialis Super Active Our price $3.66 Levitra Our price $2.93 Viagra Soft Tabs Our price $1.64 Cialis Soft Tabs Our price $3.51 And more... -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: oqxvgvs.gif Type: image/gif Size: 2411 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: amtguhx.gif Type: image/gif Size: 498 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: drbs.gif Type: image/gif Size: 395 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vsik.gif Type: image/gif Size: 728 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tguhxg.gif Type: image/gif Size: 445 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rbsuvbs.gif Type: image/gif Size: 478 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: aogqle.gif Type: image/gif Size: 496 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hfya.gif Type: image/gif Size: 474 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vbsv.gif Type: image/gif Size: 578 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ogqleb.gif Type: image/gif Size: 932 bytes Desc: not available URL: From r-sig-db m@iii@g oii st@t@m@th@ethz@ch Thu Dec 4 03:02:03 2008 From: r-sig-db m@iii@g oii st@t@m@th@ethz@ch (r-sig-db m@iii@g oii st@t@m@th@ethz@ch) Date: Thu, 4 Dec 2008 03:02:03 +0100 Subject: [R-sig-DB] !SPAM: RE: Message Message-ID: <200812040202.mB42238Q026142@hypatia.math.ethz.ch> An HTML attachment was scrubbed... URL: From Agne@mu@ke||ungeH@|ne@ @end|ng |rom ehow@com Fri Dec 5 00:08:12 2008 From: Agne@mu@ke||ungeH@|ne@ @end|ng |rom ehow@com (Vicki Bowling) Date: Thu, 4 Dec 2008 13:08:12 -1000 Subject: [R-sig-DB] !SPAM: Reward your experience with marketable degree Message-ID: <7861054200.20081111159433@ehow.com> No Exams/Books/Tests/Interview/classes 100% No Pre-School qual?ficatiio?n required! ------------------------------ Inside USA: 1-302-442-4070 0uts?de USA: +1-302-442-4070 ------------------------------ Bach?elor, Degree, [V]asteer[V]BA, PhDD (non a?credited) avail?able in the Field of your choice so you can even become a doctorr and receive All the benefits That comes withh it! Pl?ase leave below 3 Info in Vo?cemail: 1) Your name 2) Your country 3) YYoour phone no. [please include Countrycode] Cal| Now!! 24-hours a day, 7-Days a Week waiting For y?ur c?ll ------------------------------ Inside USA: 1-302-442-4070 0uts?de USA: +1-302-442-4070 ------------------------------ Our Staff will get back to You in 1-3 workingg da?s From je||@horner @end|ng |rom v@nderb||t@edu Wed Dec 10 21:39:25 2008 From: je||@horner @end|ng |rom v@nderb||t@edu (Jeffrey Horner) Date: Wed, 10 Dec 2008 14:39:25 -0600 Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: <20937808.post@talk.nabble.com> References: <20937808.post@talk.nabble.com> Message-ID: <494028FD.60008@vanderbilt.edu> PeterBvolk wrote on 12/10/2008 10:02 AM: > Hi all, > > I am working on MySQL 5.0 with RMySQL 0.7-2. All commands except for Select > statements work. I can create tables, Truncate then etc. When I issue a > Select statement with dbSendQuery containing more than one column in the > selection then R crashes. I have been looking around but could not find any > solution to this. Does anyone knows whats wrong? Can you send the output of sessionInfo() and also a small example that reproduces the crash? It would be nice to know which OS you are working on. Jeff > > Thanks > Peter -- http://biostat.mc.vanderbilt.edu/JeffreyHorner From peter@benj@m|n@vo|k @end|ng |rom |n|@tu-dre@den@de Thu Dec 11 09:03:48 2008 From: peter@benj@m|n@vo|k @end|ng |rom |n|@tu-dre@den@de (Peter Benjamin Volk) Date: Thu, 11 Dec 2008 09:03:48 +0100 Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: <494028FD.60008@vanderbilt.edu> References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> Message-ID: <4940C964.2040603@inf.tu-dresden.de> Hi Jeff, > >> Hi all, >> >> I am working on MySQL 5.0 with RMySQL 0.7-2. All commands except for >> Select >> statements work. I can create tables, Truncate then etc. When I issue a >> Select statement with dbSendQuery containing more than one column in the >> selection then R crashes. I have been looking around but could not >> find any >> solution to this. Does anyone knows whats wrong? > > Can you send the output of sessionInfo() and also a small example that > reproduces the crash? It would be nice to know which OS you are > working on. R version 2.8.0 (2008-10-20) i386-pc-mingw32 locale: LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] MASS_7.2-44 RMySQL_0.7-2 DBI_0.2-4 lattice_0.17-17 loaded via a namespace (and not attached): [1] grid_2.8.0 I'm Working on Windows XP with SP3. The MySQL Server resides on an Ubuntu Server. The failure also happens when I have the server on the same system as R. Thanks Peter -- Dipl.-Inf. Peter Benjamin Volk Dresden University of Technology / Database Technology Group Visiting Address: Noethnitzer Str. 46 / D-01187 Dresden / Germany Postal Address: Computer Science Dept / D-01062 Dresden / Germany Phone: Tue, Wed: +49-351-463-37895 / +49-351-463-38259 Mon, Thu, Fri: +49-351-4048-312 From je||@horner @end|ng |rom v@nderb||t@edu Thu Dec 11 14:43:41 2008 From: je||@horner @end|ng |rom v@nderb||t@edu (Jeffrey Horner) Date: Thu, 11 Dec 2008 07:43:41 -0600 Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: <4940C964.2040603@inf.tu-dresden.de> References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> <4940C964.2040603@inf.tu-dresden.de> Message-ID: <4941190D.6010603@vanderbilt.edu> Peter Benjamin Volk wrote: > Hi Jeff, >>> Hi all, >>> >>> I am working on MySQL 5.0 with RMySQL 0.7-2. All commands except for >>> Select >>> statements work. I can create tables, Truncate then etc. When I issue a >>> Select statement with dbSendQuery containing more than one column in the >>> selection then R crashes. I have been looking around but could not >>> find any >>> solution to this. Does anyone knows whats wrong? >> Can you send the output of sessionInfo() and also a small example that >> reproduces the crash? It would be nice to know which OS you are >> working on. > R version 2.8.0 (2008-10-20) > i386-pc-mingw32 > > locale: > LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] MASS_7.2-44 RMySQL_0.7-2 DBI_0.2-4 lattice_0.17-17 > > loaded via a namespace (and not attached): > [1] grid_2.8.0 > > > I'm Working on Windows XP with SP3. The MySQL Server resides on an > Ubuntu Server. The failure also happens when I have the server on the > same system as R. > Okay, what's the output of the following R command readRegistry: readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2) I have a suspicion it's a version mismatch between the version of MySQL client library with which the package was compiled and the version installed and loaded by RMySQL on your machine. Your output will give us the latter version, unless you have more than one installed. Jeff -- http://biostat.mc.vanderbilt.edu/JeffreyHorner From peter@benj@m|n@vo|k @end|ng |rom |n|@tu-dre@den@de Thu Dec 11 14:47:40 2008 From: peter@benj@m|n@vo|k @end|ng |rom |n|@tu-dre@den@de (Peter Benjamin Volk) Date: Thu, 11 Dec 2008 14:47:40 +0100 Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: <4941190D.6010603@vanderbilt.edu> References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> <4940C964.2040603@inf.tu-dresden.de> <4941190D.6010603@vanderbilt.edu> Message-ID: <494119FC.8090506@inf.tu-dresden.de> Hi Jeff, >>>> >>>> >>>> I am working on MySQL 5.0 with RMySQL 0.7-2. All commands except for >>>> Select >>>> statements work. I can create tables, Truncate then etc. When I >>>> issue a >>>> Select statement with dbSendQuery containing more than one column >>>> in the >>>> selection then R crashes. I have been looking around but could not >>>> find any >>>> solution to this. Does anyone knows whats wrong? >>> Can you send the output of sessionInfo() and also a small example that >>> reproduces the crash? It would be nice to know which OS you are >>> working on. >> R version 2.8.0 (2008-10-20) >> i386-pc-mingw32 >> >> locale: >> LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 >> >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> other attached packages: >> [1] MASS_7.2-44 RMySQL_0.7-2 DBI_0.2-4 lattice_0.17-17 >> >> loaded via a namespace (and not attached): >> [1] grid_2.8.0 >> >> >> I'm Working on Windows XP with SP3. The MySQL Server resides on an >> Ubuntu Server. The failure also happens when I have the server on the >> same system as R. >> > > Okay, what's the output of the following R command readRegistry: > > readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2) > > I have a suspicion it's a version mismatch between the version of > MySQL client library with which the package was compiled and the > version installed and loaded by RMySQL on your machine. Your output > will give us the latter version, unless you have more than one installed. > $`MySQL Server 5.1` $`MySQL Server 5.1`$DataLocation [1] "C:\\Documents and Settings\\All Users\\Application Data\\MySQL\\MySQL Server 5.1\\" $`MySQL Server 5.1`$FoundExistingDataDir [1] "0" $`MySQL Server 5.1`$Location [1] "C:\\Program Files\\MySQL\\MySQL Server 5.1\\" $`MySQL Server 5.1`$Version [1] "5.1.30" Also: under windows the install package menu shows two RMySQL packages that can be installed. cheers, Peter -- Dipl.-Inf. Peter Benjamin Volk Dresden University of Technology / Database Technology Group Visiting Address: Noethnitzer Str. 46 / D-01187 Dresden / Germany Postal Address: Computer Science Dept / D-01062 Dresden / Germany Phone: Tue, Wed: +49-351-463-37895 / +49-351-463-38259 Mon, Thu, Fri: +49-351-4048-312 From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Thu Dec 11 14:53:02 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Thu, 11 Dec 2008 13:53:02 +0000 (GMT) Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: <4941190D.6010603@vanderbilt.edu> References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> <4940C964.2040603@inf.tu-dresden.de> <4941190D.6010603@vanderbilt.edu> Message-ID: On Thu, 11 Dec 2008, Jeffrey Horner wrote: > Peter Benjamin Volk wrote: >> Hi Jeff, >>>> Hi all, >>>> >>>> I am working on MySQL 5.0 with RMySQL 0.7-2. All commands except for >>>> Select >>>> statements work. I can create tables, Truncate then etc. When I issue a >>>> Select statement with dbSendQuery containing more than one column in the >>>> selection then R crashes. I have been looking around but could not >>>> find any >>>> solution to this. Does anyone knows whats wrong? >>> Can you send the output of sessionInfo() and also a small example that >>> reproduces the crash? It would be nice to know which OS you are >>> working on. >> R version 2.8.0 (2008-10-20) >> i386-pc-mingw32 >> >> locale: >> LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> other attached packages: >> [1] MASS_7.2-44 RMySQL_0.7-2 DBI_0.2-4 lattice_0.17-17 >> >> loaded via a namespace (and not attached): >> [1] grid_2.8.0 >> >> >> I'm Working on Windows XP with SP3. The MySQL Server resides on an >> Ubuntu Server. The failure also happens when I have the server on the >> same system as R. >> > > Okay, what's the output of the following R command readRegistry: > > readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2) > > I have a suspicion it's a version mismatch between the version of MySQL > client library with which the package was compiled and the version installed > and loaded by RMySQL on your machine. Your output will give us the latter > version, unless you have more than one installed. More to the point, certain MySQL Windows releases have client DLLs that are known to crash RMySQL. (It would be perverse if the API had changed at patch levels within the same MySQL version, 5.0, although it has changed between versions.) As far as I recall, the deficient patch releases are within the range 5.0.21 to 5.0.44: I am pretty sure that 5.0.45 and later (including 5.0.67) are unaffected. Uwe Ligges and I built and tested RMySQL against 5.0.67, so the recommendation is to update your Windows client to that version. > > Jeff > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From je||@horner @end|ng |rom v@nderb||t@edu Thu Dec 11 16:17:30 2008 From: je||@horner @end|ng |rom v@nderb||t@edu (Jeffrey Horner) Date: Thu, 11 Dec 2008 09:17:30 -0600 Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> <4940C964.2040603@inf.tu-dresden.de> <4941190D.6010603@vanderbilt.edu> Message-ID: <49412F0A.2050006@vanderbilt.edu> Prof Brian Ripley wrote on 12/11/2008 07:53 AM: > On Thu, 11 Dec 2008, Jeffrey Horner wrote: > >> Peter Benjamin Volk wrote: >>> Hi Jeff, >>>>> Hi all, >>>>> >>>>> I am working on MySQL 5.0 with RMySQL 0.7-2. All commands except for >>>>> Select >>>>> statements work. I can create tables, Truncate then etc. When I >>>>> issue a >>>>> Select statement with dbSendQuery containing more than one column >>>>> in the >>>>> selection then R crashes. I have been looking around but could not >>>>> find any >>>>> solution to this. Does anyone knows whats wrong? >>>> Can you send the output of sessionInfo() and also a small example that >>>> reproduces the crash? It would be nice to know which OS you are >>>> working on. >>> R version 2.8.0 (2008-10-20) >>> i386-pc-mingw32 >>> >>> locale: >>> LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 >>> >>> >>> attached base packages: >>> [1] stats graphics grDevices utils datasets methods base >>> other attached packages: >>> [1] MASS_7.2-44 RMySQL_0.7-2 DBI_0.2-4 lattice_0.17-17 >>> >>> loaded via a namespace (and not attached): >>> [1] grid_2.8.0 >>> >>> >>> I'm Working on Windows XP with SP3. The MySQL Server resides on an >>> Ubuntu Server. The failure also happens when I have the server on the >>> same system as R. >>> >> >> Okay, what's the output of the following R command readRegistry: >> >> readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2) >> >> I have a suspicion it's a version mismatch between the version of >> MySQL client library with which the package was compiled and the >> version installed and loaded by RMySQL on your machine. Your output >> will give us the latter version, unless you have more than one installed. > > More to the point, certain MySQL Windows releases have client DLLs that > are known to crash RMySQL. (It would be perverse if the API had changed > at patch levels within the same MySQL version, 5.0, although it has > changed between versions.) As far as I recall, the deficient patch > releases are within the range 5.0.21 to 5.0.44: I am pretty sure that > 5.0.45 and later (including 5.0.67) are unaffected. > > Uwe Ligges and I built and tested RMySQL against 5.0.67, so the > recommendation is to update your Windows client to that version. Do you have a recommendation for me as the maintainer going forward for supporting current and future MySQL releases? It seems like Peter's case won't be last as MySQL 5.1.30 is now the recommended download (at least when you click the "Download" button on mysql.com). Jeff -- http://biostat.mc.vanderbilt.edu/JeffreyHorner From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Thu Dec 11 16:25:55 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Thu, 11 Dec 2008 15:25:55 +0000 (GMT) Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: <49412F0A.2050006@vanderbilt.edu> References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> <4940C964.2040603@inf.tu-dresden.de> <4941190D.6010603@vanderbilt.edu> <49412F0A.2050006@vanderbilt.edu> Message-ID: On Thu, 11 Dec 2008, Jeffrey Horner wrote: > Prof Brian Ripley wrote on 12/11/2008 07:53 AM: >> On Thu, 11 Dec 2008, Jeffrey Horner wrote: >> >>> Peter Benjamin Volk wrote: >>>> Hi Jeff, >>>>>> Hi all, >>>>>> >>>>>> I am working on MySQL 5.0 with RMySQL 0.7-2. All commands except for >>>>>> Select >>>>>> statements work. I can create tables, Truncate then etc. When I issue a >>>>>> Select statement with dbSendQuery containing more than one column in >>>>>> the >>>>>> selection then R crashes. I have been looking around but could not >>>>>> find any >>>>>> solution to this. Does anyone knows whats wrong? >>>>> Can you send the output of sessionInfo() and also a small example that >>>>> reproduces the crash? It would be nice to know which OS you are >>>>> working on. >>>> R version 2.8.0 (2008-10-20) >>>> i386-pc-mingw32 >>>> >>>> locale: >>>> LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 >>>> >>>> attached base packages: >>>> [1] stats graphics grDevices utils datasets methods base >>>> other attached packages: >>>> [1] MASS_7.2-44 RMySQL_0.7-2 DBI_0.2-4 lattice_0.17-17 >>>> >>>> loaded via a namespace (and not attached): >>>> [1] grid_2.8.0 >>>> >>>> >>>> I'm Working on Windows XP with SP3. The MySQL Server resides on an >>>> Ubuntu Server. The failure also happens when I have the server on the >>>> same system as R. >>>> >>> >>> Okay, what's the output of the following R command readRegistry: >>> >>> readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2) >>> >>> I have a suspicion it's a version mismatch between the version of MySQL >>> client library with which the package was compiled and the version >>> installed and loaded by RMySQL on your machine. Your output will give us >>> the latter version, unless you have more than one installed. >> >> More to the point, certain MySQL Windows releases have client DLLs that are >> known to crash RMySQL. (It would be perverse if the API had changed at >> patch levels within the same MySQL version, 5.0, although it has changed >> between versions.) As far as I recall, the deficient patch releases are >> within the range 5.0.21 to 5.0.44: I am pretty sure that 5.0.45 and later >> (including 5.0.67) are unaffected. >> >> Uwe Ligges and I built and tested RMySQL against 5.0.67, so the >> recommendation is to update your Windows client to that version. > > Do you have a recommendation for me as the maintainer going forward for > supporting current and future MySQL releases? It seems like Peter's case > won't be last as MySQL 5.1.30 is now the recommended download (at least when > you click the "Download" button on mysql.com). Not really, especially as Uwe controls the Windows binaries. (When I did, I had a ReadMe with the tested version information.) For a long time we did not distribute Windows binaries because of these version-incompatibility issues. > > Jeff > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From peter@benj@m|n@vo|k @end|ng |rom |n|@tu-dre@den@de Thu Dec 11 16:34:34 2008 From: peter@benj@m|n@vo|k @end|ng |rom |n|@tu-dre@den@de (Peter Benjamin Volk) Date: Thu, 11 Dec 2008 16:34:34 +0100 Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> <4940C964.2040603@inf.tu-dresden.de> <4941190D.6010603@vanderbilt.edu> <49412F0A.2050006@vanderbilt.edu> Message-ID: <4941330A.8080006@inf.tu-dresden.de> An HTML attachment was scrubbed... URL: From edd @end|ng |rom deb|@n@org Thu Dec 11 16:41:27 2008 From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel) Date: Thu, 11 Dec 2008 09:41:27 -0600 Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: <49412F0A.2050006@vanderbilt.edu> References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> <4940C964.2040603@inf.tu-dresden.de> <4941190D.6010603@vanderbilt.edu> <49412F0A.2050006@vanderbilt.edu> Message-ID: <18753.13479.641480.903660@ron.nulle.part> On 11 December 2008 at 09:17, Jeffrey Horner wrote: | > Uwe Ligges and I built and tested RMySQL against 5.0.67, so the | > recommendation is to update your Windows client to that version. | | Do you have a recommendation for me as the maintainer going forward for | supporting current and future MySQL releases? It seems like Peter's case | won't be last as MySQL 5.1.30 is now the recommended download (at least | when you click the "Download" button on mysql.com). As it is a rather biting constraint, I would test in configure. Many many moons ago I added this to RQuantLib's configure which is now quaint as the 2.* series rests in compiler heaves: AC_PROG_CXX if test "${GXX}" = yes; then gxx_version=`${CXX} -v 2>&1 | grep "^.*g.. version" | \\ sed -e 's/^.*g.. version *//'` case ${gxx_version} in 1.*|2.*) AC_MSG_WARN([Only g++ version 3.0 or greater can be used with RQuantib.]) AC_MSG_ERROR([Please use a different compiler.]) ;; esac fi You could use similar logic to ensure [min, max] intervals for the MySQL version you want to support. Dirk -- Three out of two people have difficulties with fractions. From ggrothend|eck @end|ng |rom gm@||@com Thu Dec 11 16:49:25 2008 From: ggrothend|eck @end|ng |rom gm@||@com (Gabor Grothendieck) Date: Thu, 11 Dec 2008 10:49:25 -0500 Subject: [R-sig-DB] [R] RMySQL Keeps crashing In-Reply-To: <49412F0A.2050006@vanderbilt.edu> References: <20937808.post@talk.nabble.com> <494028FD.60008@vanderbilt.edu> <4940C964.2040603@inf.tu-dresden.de> <4941190D.6010603@vanderbilt.edu> <49412F0A.2050006@vanderbilt.edu> Message-ID: <971536df0812110749h108ff848s75c1ffebb28ae2ed@mail.gmail.com> There is a SystemRequirements: line that can be put into the DESCRIPTION file which can then be checked by your package via: packageDescription("Ryacas")$SystemRequirements On Thu, Dec 11, 2008 at 10:17 AM, Jeffrey Horner wrote: > Prof Brian Ripley wrote on 12/11/2008 07:53 AM: >> >> On Thu, 11 Dec 2008, Jeffrey Horner wrote: >> >>> Peter Benjamin Volk wrote: >>>> >>>> Hi Jeff, >>>>>> >>>>>> Hi all, >>>>>> >>>>>> I am working on MySQL 5.0 with RMySQL 0.7-2. All commands except for >>>>>> Select >>>>>> statements work. I can create tables, Truncate then etc. When I issue >>>>>> a >>>>>> Select statement with dbSendQuery containing more than one column in >>>>>> the >>>>>> selection then R crashes. I have been looking around but could not >>>>>> find any >>>>>> solution to this. Does anyone knows whats wrong? >>>>> >>>>> Can you send the output of sessionInfo() and also a small example that >>>>> reproduces the crash? It would be nice to know which OS you are >>>>> working on. >>>> >>>> R version 2.8.0 (2008-10-20) >>>> i386-pc-mingw32 >>>> >>>> locale: >>>> >>>> LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 >>>> >>>> attached base packages: >>>> [1] stats graphics grDevices utils datasets methods base >>>> other attached packages: >>>> [1] MASS_7.2-44 RMySQL_0.7-2 DBI_0.2-4 lattice_0.17-17 >>>> >>>> loaded via a namespace (and not attached): >>>> [1] grid_2.8.0 >>>> >>>> >>>> I'm Working on Windows XP with SP3. The MySQL Server resides on an >>>> Ubuntu Server. The failure also happens when I have the server on the >>>> same system as R. >>>> >>> >>> Okay, what's the output of the following R command readRegistry: >>> >>> readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2) >>> >>> I have a suspicion it's a version mismatch between the version of MySQL >>> client library with which the package was compiled and the version installed >>> and loaded by RMySQL on your machine. Your output will give us the latter >>> version, unless you have more than one installed. >> >> More to the point, certain MySQL Windows releases have client DLLs that >> are known to crash RMySQL. (It would be perverse if the API had changed at >> patch levels within the same MySQL version, 5.0, although it has changed >> between versions.) As far as I recall, the deficient patch releases are >> within the range 5.0.21 to 5.0.44: I am pretty sure that 5.0.45 and later >> (including 5.0.67) are unaffected. >> >> Uwe Ligges and I built and tested RMySQL against 5.0.67, so the >> recommendation is to update your Windows client to that version. > > Do you have a recommendation for me as the maintainer going forward for > supporting current and future MySQL releases? It seems like Peter's case > won't be last as MySQL 5.1.30 is now the recommended download (at least when > you click the "Download" button on mysql.com). > > Jeff > -- > http://biostat.mc.vanderbilt.edu/JeffreyHorner > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > From corne| @end|ng |rom up|o@d-ro@ro Mon Dec 15 18:29:54 2008 From: corne| @end|ng |rom up|o@d-ro@ro (Cornel) Date: Mon, 15 Dec 2008 19:29:54 +0200 Subject: [R-sig-DB] util Message-ID: <20081215.JKSISVBAUTYPIAED@upload-ro.ro> An HTML attachment was scrubbed... URL: From m@tyer @end|ng |rom @t@n|ord@edu Fri Dec 19 19:31:27 2008 From: m@tyer @end|ng |rom @t@n|ord@edu (Michael Styer) Date: Fri, 19 Dec 2008 10:31:27 -0800 Subject: [R-sig-DB] RMySQL error under Windows Server 2008 64-bit Message-ID: <494BE87F.9020800@stanford.edu> Hello, I'm trying to use RMySQL under Windows Server 2008 64-bit and I encounter the following errors. MySQL version 5.0.67 is installed and running. Initially when loading RMySQL I got this error: > library("RMySQL") Error in fun(...) : MySQL is not installed according to a Registry search In addition: Warning message: package 'RMySQL' was built under R version 2.8.1 Error : .onLoad failed in 'loadNamespace' for 'RMySQL' Error: package/namespace load failed for 'RMySQL' Then I tried setting the environment variable MYSQL_HOME="C:\\Program Files\\MySQL\\MySQL Server 5.0\\", which is the installation directory for the MySQL installation on this server. After that, when loading RMySQL I get this error: > library("RMySQL") Loading required package: DBI Error : MYSQL_HOME was set but does not point to a directory In addition: Warning message: package 'RMySQL' was built under R version 2.8.1 Error : .onLoad failed in 'loadNamespace' for 'RMySQL' Error: package/namespace load failed for 'RMySQL' What else should I try to get RMySQL to load correctly? Thanks very much. Michael From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Fri Dec 19 20:00:00 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Fri, 19 Dec 2008 19:00:00 +0000 (GMT) Subject: [R-sig-DB] RMySQL error under Windows Server 2008 64-bit In-Reply-To: <494BE87F.9020800@stanford.edu> References: <494BE87F.9020800@stanford.edu> Message-ID: Are you running R on that server? If not (the most likely answer), you need MySQL on the client. If yes, I think you need 32-bit MySQL for RMySQL, even with a 64-bit server, since R for Windows is 32-bit. But I've not seen a 64-bit Windows install of MySQL. On Fri, 19 Dec 2008, Michael Styer wrote: > Hello, > > I'm trying to use RMySQL under Windows Server 2008 64-bit and I encounter the > following errors. MySQL version 5.0.67 is installed and running. > > Initially when loading RMySQL I got this error: > >> library("RMySQL") > Error in fun(...) : MySQL is not installed according to a Registry search > In addition: Warning message: > package 'RMySQL' was built under R version 2.8.1 > Error : .onLoad failed in 'loadNamespace' for 'RMySQL' > Error: package/namespace load failed for 'RMySQL' > > Then I tried setting the environment variable MYSQL_HOME="C:\\Program > Files\\MySQL\\MySQL Server 5.0\\", which is the installation directory for > the MySQL installation on this server. After that, when loading RMySQL I get > this error: > >> library("RMySQL") > Loading required package: DBI > Error : MYSQL_HOME was set but does not point to a directory > In addition: Warning message: > package 'RMySQL' was built under R version 2.8.1 > Error : .onLoad failed in 'loadNamespace' for 'RMySQL' > Error: package/namespace load failed for 'RMySQL' > > What else should I try to get RMySQL to load correctly? > > Thanks very much. > > Michael > > _______________________________________________ > R-sig-DB mailing list -- R Special Interest Group > R-sig-DB at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-db > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From m@tyer @end|ng |rom @t@n|ord@edu Fri Dec 19 20:04:21 2008 From: m@tyer @end|ng |rom @t@n|ord@edu (Michael Styer) Date: Fri, 19 Dec 2008 11:04:21 -0800 Subject: [R-sig-DB] RMySQL error under Windows Server 2008 64-bit In-Reply-To: References: <494BE87F.9020800@stanford.edu> Message-ID: <494BF035.4020804@stanford.edu> Prof Brian Ripley wrote: > Are you running R on that server? Yes, it's all happening on the same server. > If not (the most likely answer), you need MySQL on the client. > > If yes, I think you need 32-bit MySQL for RMySQL, even with a 64-bit > server, since R for Windows is 32-bit. But I've not seen a 64-bit > Windows install of MySQL. That's interesting. It doesn't seem to be reaching an incompatibility with the version of MySQL, though. The installation routine for RMySQL doesn't seem to be able to find the MySQL installation at all, so I was trying to figure out how to make sure it at least found the installation. Could it be looking for a file that doesn't exist in a 64-bit MySQL installation? That seems unlikely but I suppose it is possible. Michael From m@tyer @end|ng |rom @t@n|ord@edu Fri Dec 19 20:49:04 2008 From: m@tyer @end|ng |rom @t@n|ord@edu (Michael Styer) Date: Fri, 19 Dec 2008 11:49:04 -0800 Subject: [R-sig-DB] RMySQL error under Windows Server 2008 64-bit In-Reply-To: <494BF035.4020804@stanford.edu> References: <494BE87F.9020800@stanford.edu> <494BF035.4020804@stanford.edu> Message-ID: <494BFAB0.1030006@stanford.edu> Michael Styer wrote: > Prof Brian Ripley wrote: >> Are you running R on that server? > > Yes, it's all happening on the same server. > >> If not (the most likely answer), you need MySQL on the client. >> >> If yes, I think you need 32-bit MySQL for RMySQL, even with a 64-bit >> server, since R for Windows is 32-bit. But I've not seen a 64-bit >> Windows install of MySQL. > > That's interesting. It doesn't seem to be reaching an incompatibility > with the version of MySQL, though. The installation routine for RMySQL > doesn't seem to be able to find the MySQL installation at all, so I was > trying to figure out how to make sure it at least found the installation. OK, some further results. I set MYSQL_HOME="C:/Program Files/MySQL/MySQL Server 5.0". Sys.getenv("MYSQL_HOME") was escaping the double-backslashes in the value I used before. Now RMySQL is able to find the installation, but I think we do run into an incompatibility with 64-bit MySQL at this point. Trying to load the RMySQL library I get this error: > library("RMySQL") Loading required package: DBI Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared library 'C:/PROGRA~2/R/R-28~1.0/library/RMySQL/libs/RMySQL.dll': LoadLibrary failure: %1 is not a valid Win32 application. In addition: Warning message: package 'RMySQL' was built under R version 2.8.1 Error : .onLoad failed in 'loadNamespace' for 'RMySQL' Error: package/namespace load failed for 'RMySQL' The file RMySQL.dll does exist in that location, but it fails to load. This is beyond my knowledge; would that be because it needs a 32-bit version of MySQL to load correctly? Thanks for your help. Michael From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Fri Dec 19 21:04:21 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Fri, 19 Dec 2008 20:04:21 +0000 (GMT) Subject: [R-sig-DB] RMySQL error under Windows Server 2008 64-bit In-Reply-To: <494BFAB0.1030006@stanford.edu> References: <494BE87F.9020800@stanford.edu> <494BF035.4020804@stanford.edu> <494BFAB0.1030006@stanford.edu> Message-ID: On Fri, 19 Dec 2008, Michael Styer wrote: > Michael Styer wrote: >> Prof Brian Ripley wrote: >>> Are you running R on that server? >> >> Yes, it's all happening on the same server. >> >>> If not (the most likely answer), you need MySQL on the client. >>> >>> If yes, I think you need 32-bit MySQL for RMySQL, even with a 64-bit >>> server, since R for Windows is 32-bit. But I've not seen a 64-bit Windows >>> install of MySQL. >> >> That's interesting. It doesn't seem to be reaching an incompatibility with >> the version of MySQL, though. The installation routine for RMySQL doesn't >> seem to be able to find the MySQL installation at all, so I was trying to >> figure out how to make sure it at least found the installation. > > OK, some further results. I set MYSQL_HOME="C:/Program Files/MySQL/MySQL > Server 5.0". Sys.getenv("MYSQL_HOME") was escaping the double-backslashes in > the value I used before. > > Now RMySQL is able to find the installation, but I think we do run into an > incompatibility with 64-bit MySQL at this point. Trying to load the RMySQL > library I get this error: > > > library("RMySQL") > Loading required package: DBI > Error in inDL(x, as.logical(local), as.logical(now), ...) : > unable to load shared library > 'C:/PROGRA~2/R/R-28~1.0/library/RMySQL/libs/RMySQL.dll': > LoadLibrary failure: %1 is not a valid Win32 application. > > > In addition: Warning message: > package 'RMySQL' was built under R version 2.8.1 > Error : .onLoad failed in 'loadNamespace' for 'RMySQL' > Error: package/namespace load failed for 'RMySQL' > > The file RMySQL.dll does exist in that location, but it fails to load. This > is beyond my knowledge; would that be because it needs a 32-bit version of > MySQL to load correctly? Yes, it does. A 64-bit installation should not be under Program Files (at least on the systems I've seen), so install a 32-bit application somewhere else. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From m@tyer @end|ng |rom @t@n|ord@edu Fri Dec 19 21:07:06 2008 From: m@tyer @end|ng |rom @t@n|ord@edu (Michael Styer) Date: Fri, 19 Dec 2008 12:07:06 -0800 Subject: [R-sig-DB] RMySQL error under Windows Server 2008 64-bit In-Reply-To: References: <494BE87F.9020800@stanford.edu> <494BF035.4020804@stanford.edu> <494BFAB0.1030006@stanford.edu> Message-ID: <494BFEEA.3030904@stanford.edu> Prof Brian Ripley wrote: > On Fri, 19 Dec 2008, Michael Styer wrote: > >> Michael Styer wrote: >>> Prof Brian Ripley wrote: >>>> Are you running R on that server? >>> >>> Yes, it's all happening on the same server. >>> >>>> If not (the most likely answer), you need MySQL on the client. >>>> >>>> If yes, I think you need 32-bit MySQL for RMySQL, even with a 64-bit >>>> server, since R for Windows is 32-bit. But I've not seen a 64-bit >>>> Windows install of MySQL. >>> >>> That's interesting. It doesn't seem to be reaching an incompatibility >>> with the version of MySQL, though. The installation routine for >>> RMySQL doesn't seem to be able to find the MySQL installation at all, >>> so I was trying to figure out how to make sure it at least found the >>> installation. >> >> OK, some further results. I set MYSQL_HOME="C:/Program >> Files/MySQL/MySQL Server 5.0". Sys.getenv("MYSQL_HOME") was escaping >> the double-backslashes in the value I used before. >> >> Now RMySQL is able to find the installation, but I think we do run >> into an incompatibility with 64-bit MySQL at this point. Trying to >> load the RMySQL library I get this error: >> >> > library("RMySQL") >> Loading required package: DBI >> Error in inDL(x, as.logical(local), as.logical(now), ...) : >> unable to load shared library >> 'C:/PROGRA~2/R/R-28~1.0/library/RMySQL/libs/RMySQL.dll': >> LoadLibrary failure: %1 is not a valid Win32 application. >> >> >> In addition: Warning message: >> package 'RMySQL' was built under R version 2.8.1 >> Error : .onLoad failed in 'loadNamespace' for 'RMySQL' >> Error: package/namespace load failed for 'RMySQL' >> >> The file RMySQL.dll does exist in that location, but it fails to load. >> This is beyond my knowledge; would that be because it needs a 32-bit >> version of MySQL to load correctly? > > Yes, it does. A 64-bit installation should not be under Program Files > (at least on the systems I've seen), so install a 32-bit application > somewhere else. OK, thanks. This is the first 64-bit Windows machine I've worked with myself. It seems to install 64-bit apps in Program Files and 32-bit apps in Program Files (x86). I'm downloading the 32-bit version as we speak; I'll try installing that and pointing R to that installation. Thanks for your help. Michael From m@tyer @end|ng |rom @t@n|ord@edu Fri Dec 19 21:17:33 2008 From: m@tyer @end|ng |rom @t@n|ord@edu (Michael Styer) Date: Fri, 19 Dec 2008 12:17:33 -0800 Subject: [R-sig-DB] RMySQL error under Windows Server 2008 64-bit In-Reply-To: <494BFEEA.3030904@stanford.edu> References: <494BE87F.9020800@stanford.edu> <494BF035.4020804@stanford.edu> <494BFAB0.1030006@stanford.edu> <494BFEEA.3030904@stanford.edu> Message-ID: <494C015D.6050802@stanford.edu> Michael Styer wrote: > Prof Brian Ripley wrote: >> On Fri, 19 Dec 2008, Michael Styer wrote: >> >>> Michael Styer wrote: >>>> Prof Brian Ripley wrote: >>>>> Are you running R on that server? >>>> >>>> Yes, it's all happening on the same server. >>>> >>>>> If not (the most likely answer), you need MySQL on the client. >>>>> >>>>> If yes, I think you need 32-bit MySQL for RMySQL, even with a >>>>> 64-bit server, since R for Windows is 32-bit. But I've not seen a >>>>> 64-bit Windows install of MySQL. >>>> >>>> That's interesting. It doesn't seem to be reaching an >>>> incompatibility with the version of MySQL, though. The installation >>>> routine for RMySQL doesn't seem to be able to find the MySQL >>>> installation at all, so I was trying to figure out how to make sure >>>> it at least found the installation. >>> >>> OK, some further results. I set MYSQL_HOME="C:/Program >>> Files/MySQL/MySQL Server 5.0". Sys.getenv("MYSQL_HOME") was escaping >>> the double-backslashes in the value I used before. >>> >>> Now RMySQL is able to find the installation, but I think we do run >>> into an incompatibility with 64-bit MySQL at this point. Trying to >>> load the RMySQL library I get this error: >>> >>> > library("RMySQL") >>> Loading required package: DBI >>> Error in inDL(x, as.logical(local), as.logical(now), ...) : >>> unable to load shared library >>> 'C:/PROGRA~2/R/R-28~1.0/library/RMySQL/libs/RMySQL.dll': >>> LoadLibrary failure: %1 is not a valid Win32 application. >>> >>> >>> In addition: Warning message: >>> package 'RMySQL' was built under R version 2.8.1 >>> Error : .onLoad failed in 'loadNamespace' for 'RMySQL' >>> Error: package/namespace load failed for 'RMySQL' >>> >>> The file RMySQL.dll does exist in that location, but it fails to >>> load. This is beyond my knowledge; would that be because it needs a >>> 32-bit version of MySQL to load correctly? >> >> Yes, it does. A 64-bit installation should not be under Program Files >> (at least on the systems I've seen), so install a 32-bit application >> somewhere else. > > OK, thanks. This is the first 64-bit Windows machine I've worked with > myself. It seems to install 64-bit apps in Program Files and 32-bit apps > in Program Files (x86). > > I'm downloading the 32-bit version as we speak; I'll try installing that > and pointing R to that installation. And that works. At least, RMySQL loads; I'm not sure what limitations there are when using a 32-bit MySQL client with a 64-bit server, but that's a question for a different list. Thank you for your assistance. Michael From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Fri Dec 19 22:40:01 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Fri, 19 Dec 2008 21:40:01 +0000 (GMT) Subject: [R-sig-DB] RMySQL error under Windows Server 2008 64-bit In-Reply-To: <494C015D.6050802@stanford.edu> References: <494BE87F.9020800@stanford.edu> <494BF035.4020804@stanford.edu> <494BFAB0.1030006@stanford.edu> <494BFEEA.3030904@stanford.edu> <494C015D.6050802@stanford.edu> Message-ID: On Fri, 19 Dec 2008, Michael Styer wrote: > Michael Styer wrote: > And that works. At least, RMySQL loads; I'm not sure what limitations there > are when using a 32-bit MySQL client with a 64-bit server, but that's a > question for a different list. None that I know of: we do it all the time on Linux. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From m@tyer @end|ng |rom @t@n|ord@edu Tue Dec 23 18:53:31 2008 From: m@tyer @end|ng |rom @t@n|ord@edu (Michael Styer) Date: Tue, 23 Dec 2008 09:53:31 -0800 Subject: [R-sig-DB] R crashes querying 64-bit MySQL Message-ID: <4951259B.7080404@stanford.edu> Hello, I've installed RMySQL on Windows Server 2008 64-bit, along with a 64-bit MySQL 5.0 server and the 32-bit MySQL 5.1 client libraries. In testing the installation, I find that the R GUI crashes when trying to execute simple queries. I have this table in my database: mysql> select * from bls_regions; +---------------+-----------------+ | bls_region_id | bls_region_name | +---------------+-----------------+ | 1 | Northeast | | 2 | South | | 3 | Midwest | | 4 | West | | 5 | Other | +---------------+-----------------+ I set up the database connection as follows: library(RMySQL) m <- dbDriver("MySQL") conn <- dbConnect(m, username=user, password=pass, host=host, dbname=dbname) This query works: result <- dbGetQuery("SELECT 1") But this query causes R to crash: result <- dbGetQuery("SELECT * FROM bls_regions") By "crash" I mean, I get a Windows pop-up that says "R for Windows GUI Front End has stopped working.", and my only option is to click the button to close the program. No other error message is produced in R. In the server application log, this message appears: Faulting application Rgui.exe, version 2.80.46754.0, time stamp 0x48fc7ccf, faulting module msvcrt.dll, version 7.0.6001.18000, time stamp 0x4791a727, exception code 0xc0000005, fault offset 0x0000cb8b, process id 0x6dc, application start time 0x01c96524bd51815a If I understand that message, the error is occurring in the C runtime library, but I don't think that says very much. I can't find any other error messages that are generated. Is there somewhere else I can look for information about what might be causing the problem? Any suggestions as to how I might be able to debug this issue? I'm at a loss myself but would be happy to pursue any suggestions. Thanks for your time. Michael From jnv|ne@ @end|ng |rom gm@||@com Fri Dec 26 06:19:37 2008 From: jnv|ne@ @end|ng |rom gm@||@com (James Vines) Date: Fri, 26 Dec 2008 00:19:37 -0500 Subject: [R-sig-DB] RMySQL on Windows Vista 64bit Message-ID: <8373f2f60812252119u1d146580sd1458de94e53a4f8@mail.gmail.com> I have been trying to get RMySQL to work on Windows Vista 64 bit but I keep getting the following error when trying to load the library. > library(RMySQL) Loading required package: DBI Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared library 'C:/Users/Nick/Documents/R/win-library/2.8/RMySQL/libs/RMySQL.dll': LoadLibrary failure: %1 is not a valid Win32 application. Error : .onLoad failed in 'loadNamespace' for 'RMySQL' Error: package/namespace load failed for 'RMySQL' I looked up info on '%1 is not a valid Win32 application' but I was unable to find a solution. Is there a workaround for this or is 64bit windows just out of luck at the moment? Thanks [[alternative HTML version deleted]] From r|p|ey @end|ng |rom @t@t@@ox@@c@uk Fri Dec 26 09:01:22 2008 From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley) Date: Fri, 26 Dec 2008 08:01:22 +0000 (GMT) Subject: [R-sig-DB] RMySQL on Windows Vista 64bit In-Reply-To: <8373f2f60812252119u1d146580sd1458de94e53a4f8@mail.gmail.com> References: <8373f2f60812252119u1d146580sd1458de94e53a4f8@mail.gmail.com> Message-ID: On Fri, 26 Dec 2008, James Vines wrote: > I have been trying to get RMySQL to work on Windows Vista 64 bit but I keep > getting the following error when trying to load the library. > >> library(RMySQL) > Loading required package: DBI > Error in inDL(x, as.logical(local), as.logical(now), ...) : > unable to load shared library > 'C:/Users/Nick/Documents/R/win-library/2.8/RMySQL/libs/RMySQL.dll': > LoadLibrary failure: %1 is not a valid Win32 application. > > > Error : .onLoad failed in 'loadNamespace' for 'RMySQL' > Error: package/namespace load failed for 'RMySQL' > > > I looked up info on '%1 is not a valid Win32 application' but I was unable > to find a solution. Is there a workaround for this or is 64bit windows just > out of luck at the moment? See this thread, and especially that item: https://stat.ethz.ch/pipermail/r-sig-db/2008q4/000564.html -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595