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

ERROR: relation "default_cols" does not exist

From: "David Sadler" <david(at)dicapp(dot)com>
To: "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: ERROR: relation "default_cols" does not exist
Date: 2005-05-26 17:21:35
Message-ID: 000e01c56217$5f6f80c0$6501a8c0@TRUCK (view raw or flat)
Thread:
Lists: pgsql-novice
Hello,

Just beginning...
winXPsp2/home
PostgreSQL 8.0.2

> background
Was unable to successfully install pgsql manually.
Removed install and reinstalled making pgsql start as a service.
This was successful.

> psql
Unsuccessful in using psql.exe.
Launching psql.exe prompts for password.
Entering the password and hitting return quit psql.exe.

> pgAdmin III
Launched successfully.
Logon (using superuser password) to "PostgreSQL Database Server 8.0 (localhost:5432) successful.
Select Databases(0)
Allowed creation of test db named 'gov' via Edit/New Object/New database.
Properties:
Owner: postgres,
ACL: '',
Tablespace: pg_default,
Default schema: public,
Allow connections? yes,
Connected? yes,
System database? no;

Allowed creation of a test table named 'default_cols'.

> psql shortcuts modified
Launching the 'psql to template1' shortcut (installed by service install) accepts the superuser password and logs on (?) to template1 or just the server(?).
Presents this prompt: template1=#

Copied shortcut target path pointing to template1 ...
"C:\Program Files\PostgreSQL\8.0\bin\psql.exe" -h localhost -p 5432 template1 "postgres"

... and modified a generic shortcut to psql.exe to point to test database.
"C:\Program Files\PostgreSQL\8.0\bin\psql.exe" -h localhost -p 5432 gov "postgres"

Launching the 'psql to gov' shortcut accepts the password and logs on (?) to test database(?) or the server(?).
Presents this prompt: gov=#

> ERROR: relation "default_cols" does not exist
Any attempt to insert or select a count from default_cols yeilds the error above.

> During install I chose to allow all connections.  Here is the warning presented.

<<<
Initialize database cluster
-------------------------------------
port #: 5432
addresses: accept connections on all addresses, not just local host
locale: C
encoding: SQL_ASCII
Superuser name: postgres
Superuser password: ************
You have opted for the server to listen for connections on all local address, not just 'localhost'.

In order for clients to connect successfully, you must also grant access to specific host addresses or networks by editting the pg_hba.conf file in the data directory and restarting the PostgreSQL service.
>>>

Since I am only attempting to connect locally during this tutorial (client/server on same machine), and since pgAdmin III is allowing access to the server to view and create a db, I'm assuming the default values in the pg_hba.conf are sufficient for this tutorial.  I list the host records from the pg_hba.conf below, however, for completeness.

<<<
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL listen
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
#host    all         all         ::1/128               md5
===


I will reread the tutorial docs on install, create db and logon, but a bit of help to clarify the tutorial docs would be appreciated.

Specifically:
Where did the service install actally place the pgsql data folder that is holding the created databases?
How do I logon directly to the test db using psql.exe without modifying its target path?
Why am I not able to select from the test db table I created with getting the 
ERROR: relation "default_cols" does not exist?

Thank you.
David Sadler

Responses

pgsql-novice by date

Next:From: Nick JonesDate: 2005-05-26 20:07:36
Subject: Functions
Previous:From: stefanDate: 2005-05-26 08:09:44
Subject: Re: Library Framework

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