Обсуждение: pgAdmin Error when trying to run a simple SELECT

Поиск
Список
Период
Сортировка

pgAdmin Error when trying to run a simple SELECT

От
"Brad Smith"
Дата:
<div class="Section1"><p class="MsoNormal"><font face="Times New Roman" size="3"><span lang="EN-US"
style="font-size:12.0pt">HelloCananyone help with an error I’m suddenly getting in PgAdmin II.</span></font><p
class="MsoNormal"><fontface="Times New Roman" size="3"><span lang="EN-US" style="font-size:12.0pt"> </span></font><p
class="MsoNormal"><fontface="Times New Roman" size="3"><span lang="EN-US" style="font-size:12.0pt">My problem is this:
WheneverI try to run an SQL statement like:</span></font><p class="MsoNormal"><font face="Times New Roman"
size="3"><spanlang="EN-US" style="font-size:12.0pt">SELECT * from refUSERS;</span></font><p class="MsoNormal"><font
face="TimesNew Roman" size="3"><span lang="EN-US" style="font-size:12.0pt">I get an error:</span></font><p
class="MsoNormal"><fontface="Times New Roman" size="3"><span lang="EN-US" style="font-size:12.0pt">ERROR: Relation
"refusers"does not exist.</span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span lang="EN-US"
style="font-size:12.0pt"> </span></font><pclass="MsoNormal"><font face="Times New Roman" size="3"><span lang="EN-US"
style="font-size:12.0pt">I'vetried other simple SELECT statements but get the same message.</span></font><p
class="MsoNormal"><fontface="Times New Roman" size="3"><span lang="EN-US" style="font-size:12.0pt"> </span></font><p
class="MsoNormal"><fontface="Times New Roman" size="3"><span lang="EN-US" style="font-size:12.0pt">I can't for the life
ofme understand what's changed.</span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span
lang="EN-US"style="font-size:12.0pt"> </span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span
lang="EN-US"style="font-size:12.0pt">I can use other databases using the same login credentials and login procedures
andthe error does not occur when using them; it only seems to occur with this particular database. I can ‘see’ the
databasefine in the Menu Tree. I can drill down to the tables and I can see the table data by clicking on the
Sunglassesicon – I just can’t seem to run a basic query.</span></font><p class="MsoNormal"><font face="Times New Roman"
size="3"><spanlang="EN-US" style="font-size:12.0pt">Can any one help/suggest anything at all? Do I need to prefix the
tablename with something? (although I never had to before)</span></font><p class="MsoNormal"><font face="Times New
Roman"size="3"><span lang="EN-US" style="font-size:12.0pt"> </span></font><p class="MsoNormal"><font face="Times New
Roman"size="3"><span lang="EN-US" style="font-size:12.0pt">Brad.</span></font></div> 

Re: pgAdmin Error when trying to run a simple SELECT

От
John DeSoi
Дата:
On Sep 12, 2005, at 5:53 AM, Brad Smith wrote:

> My problem is this: Whenever I try to run an SQL statement like:
>
> SELECT * from refUSERS;
>
> I get an error:
>
> ERROR: Relation "refusers" does not exist.
PostgreSQL folds unquoted identifiers to lower case. So if your  
select has the correct spelling you need to use:

SELECT * from "refUSERS";


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