[R-sig-DB] RODBC error when connecting to postgres

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Thu May 9 15:12:43 CEST 2013


On 9 May 2013 at 05:48, Chris Colburn wrote:
| Hello All,
| 
| I�m trying to connect via ODBC to a postgres database. Although I�ve been
| able to test my ODBC configurations using isql I am now getting the
| following error in R.  This seems like a memory issue, but cannot tell if
| the �calloc� error is a red herring.  Let me know if you need any more
| information.  Many thanks in advance!
| 
| > library(RODBC)> myconn <- odbcConnect("postgres_dsn", uid="test",
| pwd="<PASSWD>")
| > sqlQuery(myconn,"select count(*) from test_table;")
| Error in odbcQuery(channel, query, rows_at_time) :  'Calloc' could not
| allocate memory (18446744073709551616 of 22816 bytes)

That sort of rings a bell.  As the number is HUGE it could be a type
mismatch.  Are you sure you are not mixing 32 and 64 bit libraries?

Also note that there is a _native_ connection package in RPostgreSQL which
you could try.

Dirk

| 
| > versionplatform       x86_64-suse-linux-gnu
| arch           x86_64
| os             linux-gnu
| system         x86_64, linux-gnu
| status
| major          3
| minor          0.0
| year           2013
| month          04
| day            03
| svn rev        62481
| language       R
| version.string R version 3.0.0 (2013-04-03)
| nickname       Masked Marvel
| 
| Any help that you can provide is greatly appreciate, and I will try to
| respond as quickly as possible.
| 
| Very Sincerely,
| Chris
| 
| 	[[alternative HTML version deleted]]
| 
| 
| ----------------------------------------------------------------------
| _______________________________________________
| R-sig-DB mailing list -- R Special Interest Group
| R-sig-DB using r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-db

-- 
Dirk Eddelbuettel | edd using debian.org | http://dirk.eddelbuettel.com




More information about the R-sig-DB mailing list