Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6595345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:55:43+00:00 2026-05-25T17:55:43+00:00

I have a database in PostgreSQL which is named DATA in all caps. When

  • 0

I have a database in PostgreSQL which is named DATA in all caps. When I try to write an R data.frame to this database using RPostgreSQL like so:

library(RPostgreSQL)
con <- dbConnect(PostgreSQL(), host="myhost", 
                 user= "postgres", password="myPass", dbname="DATA")
dbWriteTable(con, "test", myDf)

I get the following error:

Error in postgresqlExecStatement(conn, statement, ...) : 
  RS-DBI driver: (could not Retrieve the result : ERROR:  no schema has been selected to create in
)
[1] FALSE

However I notice that if I go to Postgresql and change the database name to data (lower case) and then change the script to call dbname="data" then it works like a charm.

I looked through the documentation for rPostgreSQL and the only mention of case I saw had to do with field names being case sensitive.

So my questions are:

  1. Is this behavior is expected?
  2. In my situation I control the DB so I can rename the database at will. How would I work around this behavior if I could not rename the database to all lower case?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:55:43+00:00Added an answer on May 25, 2026 at 5:55 pm

    There were definitely issues with tables in upper-case. In think we handle that now:
    Try quoting it as “DATA” and it should go through. Unquoted table identifier all get lower-cased.

    Your issue is having the entire database in uppercase. It may also work with quoting, maybe even with '\"DATA\"' as an argument to dbConnect.

    Otherwise, reproducible examples on the list are best, and with some luck, Tomoaki will find a fix for your problem.

    Oh, and we spell it like the package: RPostgreSQL with capital arrrrrrr, especially today on talk like a piRate day.

    Edit: Looks like there is simply no issue with current versions on Ubuntu 11.04:

    First, create DATA

    edd@max:~$ createdb DATA
    edd@max:~$ psql DATA
    psql (8.4.8)
    Type "help" for help.
    
    DATA=# \q
    edd@max:~$ 
    

    Second, and in R, connect and save some data:

    R> library(RPostgreSQL)
    R> con <- dbConnect(PostgreSQL(), host="localhost", user= "edd", 
    +                   password=".....", dbname="DATA")
    R> con
    <PostgreSQLConnection:(21936,0)> 
    R> dbWriteTable(con, "quicktest", cars)
    [1] TRUE
    R> 
    

    Third, check for content in DATA:

    DATA=# select * from quicktest limit 5;
     row_names | speed | dist 
    -----------+-------+------
     1         |     4 |    2
     2         |     4 |   10
     3         |     7 |    4
     4         |     7 |   22
     5         |     8 |   16
    (5 rows)
    
    DATA=# 
    

    Looking good to me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a column in the PostgreSQL database which contains Arabic data. When reading
I have a postgresql database which look like the following : +---------------+---------------- ------+------------ ---+
I have a Postgresql database on which I want to do a few cascading
Right now I have a database (about 2-3 GB) in PostgreSQL, which serves as
I have a Spring application which uses Hibernate on a PostgreSQL database. I'm trying
I write an application based on an already existing database (postgreSQL) using JPA and
I am using a hibernate application to store data in Postgres database I have
I have a PostgreSQL database with two tables named user and group. They have
I have an application config file that looks something like this: database: type: [db-type]
In a postgresql database I have 2 tables like these ones: Table items: item_id

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.