SELECT problem

From: David Goodenough <david(dot)goodenough(at)btconnect(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SELECT problem
Date: 2002-06-21 10:38:39
Message-ID: 20020621103836.0713E4758E9@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am obviously doing something very stupid, but I get a problem using
specific columns in a SELECT statement. I am running 7.2 on a Debian
system.

The problem is that when I reference a specific column, it says attribute
not found, but the column is there, at least according to \d. Here is the
\d for the table (called sites) the result from a SELECT * and the offending
SELECT AREA. Now I did check that AREA was not a keyword, and it would appear
not to be. I also checked after this log with some data in the table, but
it made no difference.

Any ideas:

Here is the console output:-

landn=# \d sites
Table "sites"
Column | Type | Modifiers
-----------+-----------------------+-----------
CUSTNAME | character varying(8) |
AREA | character varying(8) |
SITE | character varying(24) |
NAME | character varying(24) |
BUILDING | character varying(50) |
TOWN | character varying(50) |
COUNTY | character varying(50) |
POSTCODE | character varying(15) |
GRIDREF | character varying(12) |
LATITUDE | character varying(12) |
LONGITUDE | character varying(12) |

landn=# select * from sites;
CUSTNAME | AREA | SITE | NAME | BUILDING | TOWN | COUNTY | POSTCODE |
GRIDREF | LATITUDE | LONGITUDE
----------+------+------+------+----------+------+--------+----------+---------+----------+-----------
(0 rows)

landn=# select area from sites;
ERROR: Attribute 'area' not found
landn=#

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karel Zak 2002-06-21 10:46:56 Re: SELECT problem
Previous Message Dave Cramer 2002-06-21 09:13:30 Re: timezone incompatibility