Skip site navigation (1) Skip section navigation (2)

Re: ERROR: relation "default_cols" does not exist

From: "David Sadler" <david(at)dicapp(dot)com>
To: "John DeSoi" <desoi(at)pgedit(dot)com>
Cc: "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: ERROR: relation "default_cols" does not exist
Date: 2005-05-29 17:50:39
Message-ID: 000901c56476$ee411b90$6501a8c0@TRUCK (view raw or flat)
Thread:
Lists: pgsql-novice
Hi, John,

jd: When you use psql, you must specify the database you  want to connect 
to. It is not a step after connecting. This might not  be apparent if you 
quickly glance at the documentation because it shows  that dbname and user 
name are optional parameters. But if you don't supply a database name, it 
tries to connect to a database which matches your account user name.

dss: I will take a closer look at that logon command syntax.

...

dss: >> Why am I not able to select from the test db table I created? 
Instead, I get... ERROR: relation "default_cols" does not exist?

jd: PostgreSQL folds unquoted identifier names to lower case. If your table 
listing shows the name in upper (or mixed) case, it likely means that the 
table was named with quotes as in

CREATE TABLE "DEFAULT_COLS" ...

rather than

CREATE TABLE DEFAULT_COLS ...

So if it is named using double quotes, you will have to use that in your 
commands:
select * from "DEFAULT_COLS";

dss:  PROBLEM SOLVED.  The quotes were the issue.  fyi, the table was 
created by using pgAdmin III (default settings), so that default is naming 
tables using quotes.  Thank you very much, Sir.

David Sadler

Ref:

(1)
----- Original Message ----- 
From: "John DeSoi" <desoi(at)pgedit(dot)com>
To: "David Sadler" <david(at)dicapp(dot)com>
Cc: "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Sent: Saturday, May 28, 2005 12:11 AM
Subject: Re: [NOVICE] ERROR: relation "default_cols" does not exist

> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL 



In response to

pgsql-novice by date

Next:From: klassenlotterie01Date: 2005-05-30 02:12:10
Subject: Congratulations! *SKL WINNER* Contact Your Claims Agent.
Previous:From: InfoDate: 2005-05-29 12:28:55
Subject: How to Install only DBEngine under Win

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group