Thread: Problem with public schema

Problem with public schema

From
"Nick Allan"
Date:
Hi all
I've just started using postgres and have all my tables defined in the public schema.
For some reason I'm being forced to use sql like the following
select * from public."tblCategory";
instead of
select * from tblCategory;
 
the
show search_path;
command returns
$user,public
 
When I use commands like
select * from tblCategory;
I get the following error

ERROR:  Relation "tblcategory" does not exist

 

Anyone got any suggestions on what I'm missing here?

 

I tried to post this to the pgsql-novice mailing list but it doesn't seem to appear on the mailing list.

 

Nick Allan

Adaptive Technology Consultant

___________________________________________________

RVIB - VisTech

201 High Street, Prahran Vic 3181

Website:           www.vistech.rvib.org.au

Email:           nick.allan@rvib.org.au
Phone:            +613  9520 5555
Fax:             +613 9525 2065

___________________________________________

This email (including all attachments) may contain personal information and is intended solely for the named addressee. It is confidential and may be subject
to legal or other professional privilege.  Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake.
If you have received it in error, please let us know by reply email, delete it from your system and destroy any copies.

This email is also subject to copyright. No part of it should be reproduced, adapted or communicated without the written consent of the copyright owner.
Any personal information in this email must be handled in accordance with the Privacy Act 1988 (Cth).

Emails may be interfered with, may contain computer viruses or other defects and may not be successfully replicated on other systems. We give no warranties
in relation to these matters. If you have any doubts about the authenticity of an email purportedly sent by us, please contact us immediately.




 

 

Re: Problem with public schema

From
Richard Huxton
Date:
Nick Allan wrote:
> Hi all
> I've just started using postgres and have all my tables defined in the
> public schema.
> For some reason I'm being forced to use sql like the following
> select * from public."tblCategory";
> instead of
> select * from tblCategory;

You must have defined it as:
   CREATE TABLE "tblCategory"

If you define a table using quotes, you need to quote it on access. If
you don't define using quotes, you don't need quotes on access.

--
   Richard Huxton
   Archonet Ltd

Re: Problem with public schema

From
jarednevans@yahoo.com
Date:
You mixed in uppercase/lowercase letters. PGAdminIII, if you are using
that, will automatically include the double quotes in the object name.
Jared