Comments (1)
I have the same error in the different use case. I believe my case is more
clear and easy to reproduce.
I want to log API calls performed on market's API interface. Then I want to
check the last API call time on particular market.
1.
Create empty table base on structure (I prefer to create this way as it fully
reflects the data I'm going to store in that table):
dbWriteTable(conn = con, name = c('some_schema,'api_call'), value =
data.table(market = character(), action = character(), api_call =
as.POSIXct(NA,origin='1970-01-01',tz='GMT')[-1]), append = FALSE, row.names =
FALSE)
It is working fine.
2.
Then I query the last API call on market - still I need to handle case when
api_call table is empty:
dbGetQuery(conn = con, sql = "select api_call from some_schema.api_call where
market = 'market_name' order by api_call desc limit 1")
I've got:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘dbGetQuery’ for signature ‘"PostgreSQLConnection", "missing"’
I think the source of the issue might be in as.POSIXct(NULL,...) which I can
handle in R by as.POSIXct(NA,...)[-1] as shown above, but such workaround might
not be implemented in DBI/RPostgreSQL.
The best fix I think is to store the timestamp as integer but then I need to
decode it in each interface that uses api_call data. I prefer to store normal
timestamp there instead of integer. Any other way?
Win7 x64, R 3.0.2, postgres 9.3, RPostgreSQL 0.4
Regards
Original comment by [email protected]
on 7 Dec 2013 at 1:06
from rpostgresql.
Related Issues (20)
- Error loading RPostgreSQL HOT 6
- 'dbWriteTable()' does not write data out of public schema HOT 4
- configure: error: cannot guess build type; you must specify one in [install.packages("RPostgreSQL")] HOT 2
- Issue installing RPostgreSQL on linux HOT 6
- Unable to install in R HOT 6
- Create Roles and users from RPostgreSQL HOT 4
- dbSendQuery segfault on bad SQL query HOT 1
- How to find headers in /usr/include/psql? HOT 2
- How to pass binary_parameters="yes"? HOT 1
- please support PQconnectdb() interface HOT 2
- `dbConnect()` crashes R Studio instead of erroring HOT 4
- CRAN NEWS and Changelog are out of date
- libpq version 10 or above required for authentication HOT 6
- Old problem: libpg version problems HOT 5
- RPostgreSQL 0.7-4 isn't working with libpq 15.1? HOT 2
- dbListFields incorrectly returns columns which have been removed
- ID class, dbQuoteIdentifier(), and dbUnquoteIdentifier() support
- Incorperating this package as a dependency in another R package
- Enable `DBI::dbIsValid` for RPosgreSQL
- ** CONSIDER USING THE `RPostgres` PACKAGE INSTEAD ** HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpostgresql.