Learn how to a build a cloud-first strategyRegister Now


"relation does not exist", ERROR 42P01

Posted on 2005-04-07
Medium Priority
Last Modified: 2011-04-14
Hi . . I've installed PostgreSQL 8.0, PgAdminIII and the Npgsql .NET data provider.

I've created a user, a database owned by that user, and set the database to accept connections.  

I can connect to the db server, and run a query like "SELECT VERSION()", but when I try to "SELECT COUNT(*)" from any table in the database, I get the error "relation TABLE_NAME does not exist".

Obviously, the connection to the server is fine, but for some reason the connection to the database isn't working.  I've never used PostgreSQL before this (mainly MySQL), so it could definitely be something simple I've overlooked.

Thanks, everyone :)

Question by:michaelwkane
1 Comment
LVL 22

Accepted Solution

earth man2 earned 1500 total points
ID: 13725275
login to your database using psql

What tables are there using the following commands \dS is for system tables

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Integration Management Part 2
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question