Rob, this is what you do.

Either:

1. Use plain lowercase for all of your tablevar and other entity names, meaning it will work both quoted and unquoted in all contexts.

2. If you use any uppercase, then if writing SQL you use double-quotes around said entity nmes everywhere they appear.

See, SQL entities are case-sensitive in the general case of being quoted, but in the special case of not quoting the names in SQL, they are folded to lowercase before being matched.

If this is all complicated to you, then just use straight lowercase everywhere and it will just work.

-- Darren Duncan

On 2014-05-30, 1:56 PM, Rob Richardson wrote:
Thank you for your reply.  You said, in part:

        What's happening in your case is that the table must have been created 
like this:

                  create table "Log" [.....]

But the whole point of my message is that that is not how this table was created.  I did not open an SQL window and type in the CREATE 
TABLE command manually.  I selected the database in PGAdmin, went down to the Tables list (which said I had 0 table), right clicked on the 
word "Tables", and selected "New table".  In the new table dialog I entered the table name as Log (no quotes), I 
defined its columns and its primary key, and I clicked OK.  After I did all that, I then found that "select * from Log" (no 
quotes around Log) failed, claiming there was no relation named "Log".  I then found that "select * from "Log" 
" (quotes around Log) worked.  I then concluded that the table was being created with the double quotes included in the table name.

I did find one place where I actually saw the name referred to as '"Log"'.  
That's the word Log, surrounded by double quotes, and then surrounded again by single 
quotes.  Unfortunately, I do not now remember where that was.

RobR




--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

Reply via email to