Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error: Failed to fetch row: ERROR: SET datestyle takes only one argument. #360

@gtb77041

Description

@gtb77041

First, and most importantly, I send my sincere thanks for the work you do maintaining this important R library.

I am having an issue using RPostgres to connect to CockroachDB. When I attempt to connect, R returns an error:
"Error: Failed to fetch row: ERROR: SET datestyle takes only one argument."

I posted my issue on Cockroach's forum. A kind person with Cockroach replied, informing me that I was connecting successfully, but that RPostgres was running a query after the connection, and something in that query was malformed. He went on to explain: "On connection, RPostgres runs the query SET datestyle to iso, mdy; the correct way would be SET datestyle to 'iso, mdy'; with the single-quotes added."

I appreciate your assistance with this.

con = dbConnect(dbDriver("Postgres"),
                dbname = "MyDatabase", 
                host = "free-tier4.aws-us-west-2.cockroachlabs.cloud", 
                port = '26257',
                user = "myUserName",
                password = 'myPassword',
                sslmode = "verify-full",
                sslrootcert= paste0(Sys.getenv('APPDATA'), "\\postgresql\\root.crt"),
                options = "--cluster=myCluster-1441",
                )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions