Skip to content

RODBC error when connecting to postgres

2 messages · Chris Colburn, Dirk Eddelbuettel

#
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!
pwd="<PASSWD>")
Error in odbcQuery(channel, query, rows_at_time) :  'Calloc' could not
allocate memory (18446744073709551616 of 22816 bytes)
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
#
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 at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-db