Comments (6)
Please include a minimal reproducible example that actually verifies that the values are different (not just printed differently, e.g. by subtracting the two values)
from rpostgres.
Sure. I only spotted this because I was migrating a package to use RPostgres, and it fails on writing this dataframe: https://github.com/robertzk/cachemeifyoucan/blob/master/tests/testthat/helper-batch_data.R
I'll try to come up with a simpler example in the mean time
from rpostgres.
Here!
Browse[1]> conn
<PqConnection> travis@localhost:5432
Browse[1]> df_ref
id x y
1 1 0.5608329 -1.4917053
2 2 0.7946495 -0.3914652
3 3 0.5892545 0.9543467
4 4 0.8914159 -1.0087213
5 5 0.5881625 1.0540364
Browse[1]> DBI::dbWriteTable(conn, 'will_drop_digits', df_ref)
[1] TRUE
Browse[1]> df_check <- dbReadTable(conn, 'will_drop_digits')
Browse[1]> df_check
id x y
1 1 0.560833 -1.491710
2 2 0.794649 -0.391465
3 3 0.589254 0.954347
4 4 0.891416 -1.008720
5 5 0.588162 1.054040
Browse[1]> df_check$x == df_ref$x
[1] FALSE FALSE FALSE FALSE FALSE
Browse[1]> df_check$x - df_ref$x
[1] 1.454068e-07 -4.519711e-07 -4.533126e-07 1.262247e-07 -4.661852e-07
Output from psql
travis=> select * from will_drop_digits ;
id | x | y
----+----------+-----------
1 | 0.560833 | -1.49171
2 | 0.794649 | -0.391465
3 | 0.589254 | 0.954347
4 | 0.891416 | -1.00872
5 | 0.588162 | 1.05404
(5 rows)
from rpostgres.
Can you please make an example that I can copy and paste into R easily?
from rpostgres.
Don't know what happened, but my tests magically passed today. Closing the issue.
The only thing I've changed in my code was update R and change dbGetQuery(conn, "BEGIN")
to dbSendQuery
, but I presume something happened in this repo or in the R version.
from rpostgres.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
from rpostgres.
Related Issues (20)
- Unable to create database connection, crashes, produces unprintable characters HOT 7
- List tables in schema with dbListTables HOT 3
- Converting RPostgres backend to cpp11 HOT 4
- Site to test the same database in multiple backends
- `dbWriteTable(temporary = TRUE, overwrite = TRUE)` deletes non-temporary table! HOT 1
- Printing of "invalid" `PqConnection` object HOT 1
- Connection to AWS DB with RPostgres on M1 Mac HOT 18
- binding parameters fails with input from dbQuoteLiteral HOT 2
- Connection closed unexpectedly by server HOT 9
- Encoding issue with identifiers passed via dbWriteTable or copy_to? HOT 3
- Cannot use DBI::dbWriteTable to save temporary table to Redshift HOT 2
- Failure to acquire connections on Mac OS within multicore fork()-ed process HOT 2
- Redshift varchar character length not respected by dplyr::rows_*() HOT 5
- collation warning on Ubuntu 22.04 HOT 4
- relicense RPostgres as MIT HOT 2
- using databases.pacha.dev for testing HOT 4
- Curious bug with transaction and `dbSendQuery()` HOT 6
- Redshift: dbWriteTable() with larger DFs and CSVs HOT 3
- Unable to create table with logical column HOT 4
- Schema with DBI::Id appears not to work with `dbListTables` HOT 4
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 rpostgres.