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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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