PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name

Поиск
Список
Период
Сортировка
От Rob Richardson
Тема PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name
Дата
Msg-id 67D108EDFAD3C148A593E6ED7DCB4BBDD84686CF@RADCONWIN2K8PDC.radcon.local
обсуждение исходный текст
Ответы Re: PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name  (Raymond O'Donnell <rod@iol.ie>)
Список pgadmin-support
<div class="WordSection1"><p class="MsoNormal">I just spent half a day trying to set up a log4net AdoNetAppender to
writeinto a PostgreSQL table named “Log”.  It was not working, and I was not getting any error messages anyplace.  Not
myapplication, not PostgreSQL log files.  I stripped the log4net configuration file to a bare minimum, where it merely
writesthe same message every time, using this query:<p class="MsoNormal"> <p class="MsoNormal">INSERT INTO Log
(message)VALUES (‘This is a log message’);<p class="MsoNormal"> <p class="MsoNormal">I could not get it to work.<p
class="MsoNormal"> <pclass="MsoNormal">Finally, in desperation, I opened an SQL window in PGAdmin, and pasted the query
intoit.  It didn’t work!  It claimed there is no relation named Log.  I tried this:<p class="MsoNormal">INSERT INTO log
(message)VALUES ('This is a log message');<p class="MsoNormal">It didn’t work either.<p class="MsoNormal">I tried
this:<pclass="MsoNormal">INSERT INTO “Log” (message) VALUES (‘This is a log message’);<p class="MsoNormal">That
worked!<pclass="MsoNormal"> <p class="MsoNormal">When I was staring at the table definition PGAdmin showed me, I
noticedthat the SQL to create the table began with:<p class="MsoNormal">CREATE TABLE “Log”<p class="MsoNormal">Note the
doublequotes around the word Log.  I came to the conclusion that the double quotes are actually being included in the
tablename.  <p class="MsoNormal"> <p class="MsoNormal">I dropped the table and recreated it manually.  Now, when I look
atthe create table script, I see that it begins with:<p class="MsoNormal">CREATE TABLE Log<p class="MsoNormal">And when
Irun the application that tries to write log messages into that table, it works!<p class="MsoNormal"> <p
class="MsoNormal">Wecannot have double quotes embedded in object names for our applications.  It would be a huge change
inthe way many pieces of our products are configured.  Is there a way to change this behavior, or do we have to revert
toan older version of PostgreSQL?<p class="MsoNormal"> <p class="MsoNormal">Thank you very much!<p
class="MsoNormal"> <pclass="MsoNormal">RobR</div> 

В списке pgadmin-support по дате отправления:

Предыдущее
От: Luís de Sousa
Дата:
Сообщение: Re: Object tree invisible on Ubuntu 14.04
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name