From: | Rob Richardson <RDRichardson(at)rad-con(dot)com> |
---|---|
To: | "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org> |
Subject: | PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name |
Date: | 2014-05-30 19:49:09 |
Message-ID: | 67D108EDFAD3C148A593E6ED7DCB4BBDD84686CF@RADCONWIN2K8PDC.radcon.local |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
I just spent half a day trying to set up a log4net AdoNetAppender to write into a PostgreSQL table named "Log". It was not working, and I was not getting any error messages anyplace. Not my application, not PostgreSQL log files. I stripped the log4net configuration file to a bare minimum, where it merely writes the same message every time, using this query:
INSERT INTO Log (message) VALUES ('This is a log message');
I could not get it to work.
Finally, in desperation, I opened an SQL window in PGAdmin, and pasted the query into it. It didn't work! It claimed there is no relation named Log. I tried this:
INSERT INTO log (message) VALUES ('This is a log message');
It didn't work either.
I tried this:
INSERT INTO "Log" (message) VALUES ('This is a log message');
That worked!
When I was staring at the table definition PGAdmin showed me, I noticed that the SQL to create the table began with:
CREATE TABLE "Log"
Note the double quotes around the word Log. I came to the conclusion that the double quotes are actually being included in the table name.
I dropped the table and recreated it manually. Now, when I look at the create table script, I see that it begins with:
CREATE TABLE Log
And when I run the application that tries to write log messages into that table, it works!
We cannot have double quotes embedded in object names for our applications. It would be a huge change in the way many pieces of our products are configured. Is there a way to change this behavior, or do we have to revert to an older version of PostgreSQL?
Thank you very much!
RobR
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2014-05-30 20:49:42 | Re: PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name |
Previous Message | Luís de Sousa | 2014-05-27 05:57:55 | Re: Object tree invisible on Ubuntu 14.04 |