Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unrecognized PostgreSQL field type uuid (id:2950) #30

Closed
koseri opened this issue Apr 21, 2015 · 15 comments · Fixed by #55
Closed

unrecognized PostgreSQL field type uuid (id:2950) #30

koseri opened this issue Apr 21, 2015 · 15 comments · Fixed by #55
Milestone

Comments

@koseri
Copy link

koseri commented Apr 21, 2015

Connecting to a table with field type uuid generates a warning.

Table creation

CREATE TABLE prd_tv_sandbox.r_gender
(
respid UUID,
wave_id UUID,
gender INTEGER,
PRIMARY KEY (respid,wave_id)
);

# The R:

library (RPostgres)
library ( dplyr)
library ( DBI )


con_sb <- src_postgres(dbname = "the_db",   user = "[id]", password = "***")

gen_db <-  tbl ( con_sb, "r_gender" )

Warning messages:
1: In postgresqlExecStatement(conn, statement, ...) :
RS-DBI driver warning: (unrecognized PostgreSQL field type uuid (id:2950) in column 0)
2: In postgresqlExecStatement(conn, statement, ...) :
RS-DBI driver warning: (unrecognized PostgreSQL field type uuid (id:2950) in column 1)

@koseri
Copy link
Author

koseri commented Apr 21, 2015

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
);

@alexfun
Copy link

alexfun commented Apr 28, 2015

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

@koseri
Copy link
Author

koseri commented Apr 28, 2015

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.

@alexfun
Copy link

alexfun commented Apr 29, 2015

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.

@koseri
Copy link
Author

koseri commented Apr 29, 2015

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

@Andrei-Pozolotin
Copy link

+1

2 similar comments
@abhoffman
Copy link

+1

@thoughtfuldata
Copy link

+1

JackStat added a commit to JackStat/RPostgres that referenced this issue Oct 14, 2015
JackStat added a commit to JackStat/RPostgres that referenced this issue Oct 16, 2015
@krlmlr krlmlr added this to the 1.0 milestone Nov 11, 2015
@EmteZogaf
Copy link

+1

@JackStat
Copy link
Contributor

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.

@krlmlr
Copy link
Member

krlmlr commented Jan 27, 2016

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

@krlmlr krlmlr closed this as completed in #55 Feb 2, 2016
krlmlr added a commit that referenced this issue Feb 2, 2016
- Accept columns with UUID type (#30, @JackStat).
- Closes #78.
@jnolis

This comment has been minimized.

@krlmlr

This comment has been minimized.

@jnolis

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Dec 7, 2020

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.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants