Giter Site home page Giter Site logo

Comments (15)

koseri avatar koseri commented on June 24, 2024 3

It is indeed character data in R. However, as soon as you connect to or use a table with Postgres field type UUID, the driver starts throwing warnings. Incessant warnings over nothing are undesirable.

from rpostgres.

koseri avatar koseri commented on June 24, 2024

BTW, if you don't have any UUIDs handy, Postgres will be glad to make them for you.

CREATE TABLE fuutab
(
fuu UUID DEFAULT uuid_generate_v4(),
name VARCHAR(255) NOT NULL
);

from rpostgres.

alexfun avatar alexfun commented on June 24, 2024

Is this a problem? R doesn't have any default data types to handle uuids... I am guessing it gets converted to character().

from rpostgres.

alexfun avatar alexfun commented on June 24, 2024

But for other cases the warning is helpful. E.g. if you have the citext (case insensitive text) plug-in installed, then you have to be careful writing and downloading data from case insensitive columns.

from rpostgres.

koseri avatar koseri commented on June 24, 2024

The idea would be to throw warnings only for truly unrecognized types.

from rpostgres.

Andrei-Pozolotin avatar Andrei-Pozolotin commented on June 24, 2024

+1

from rpostgres.

abhoffman avatar abhoffman commented on June 24, 2024

+1

from rpostgres.

thoughtfuldata avatar thoughtfuldata commented on June 24, 2024

+1

from rpostgres.

EmteZogaf avatar EmteZogaf commented on June 24, 2024

+1

from rpostgres.

JackStat avatar JackStat commented on June 24, 2024

Can someone review the pull request #55 and merge or make recommendations for modifications? I just want the changes to be fresh if there is a discussion to be had and it seems like people would like to see a fix added.

from rpostgres.

krlmlr avatar krlmlr commented on June 24, 2024

Done. For now there's devtools::install_github("rstats-db/RPostgres#55")

from rpostgres.

jnolis avatar jnolis commented on June 24, 2024

This issue was closed a long time ago, yet somehow I am still seeing this error.

con <- DBI::dbConnect(RPostgreSQL::PostgreSQL(),
                 dbname =  "postgres",
                 port = 5432,
                 host = "127.0.0.1",
                 user = "postgres",
                 password = password
  )
DBI::dbSendStatement(con,"CREATE TABLE test (id UUID DEFAULT uuid_generate_v4 ());")
DBI::dbGetQuery(con,"SELECT * FROM test")

Yields:

data frame with 0 columns and 0 rows
Warning message:
In postgresqlExecStatement(conn, statement, ...) :
  RS-DBI driver warning: (unrecognized PostgreSQL field type uuid (id:2950) in column 0)

Any idea why it might be showing up? Thank you!

(also I'm happy to make a new issue out of this or whatever is most convenient, rather than commenting on a super old issue).

from rpostgres.

krlmlr avatar krlmlr commented on June 24, 2024

The code refers to the {RPostgreSQL} package, this repo hosts the {RPostgres} package. Do you still see the error when using {RPostgres}?

from rpostgres.

jnolis avatar jnolis commented on June 24, 2024

Nope no issue. Sorry I didn't realize they were two separate packages!

from rpostgres.

github-actions avatar github-actions commented on June 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.