Re: Re: PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name - Mailing list pgadmin-support

From Dave Page
Subject Re: Re: PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name
Date
Msg-id CA+OCxowHZPAk+FfiYg4S3QkwrpQ8guF+K4gzMm6xGa5-ZpTorg@mail.gmail.com
Whole thread Raw
In response to Re: PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name  (David G Johnston <david.g.johnston@gmail.com>)
List pgadmin-support
On Mon, Jun 2, 2014 at 7:09 PM, David G Johnston
<david.g.johnston@gmail.com> wrote:
>>
>> I
>> f all the letters are lowercase, no double quotes are added.
>
>
> I don't know if this statement is actually true but it makes no difference
> in reality whether the double-quotes are added in the case where only
> lowercase letters and numbers/underscore are used.  As far the executor is
> concerned the same exact identifier text will be used.  Likely, and for
> reasoning purposes, it is sufficient to consider that ALL identifiers
> generated by pgAdmin are surrounded with double-quotes in the resultant SQL
> statements that are sent to the server.

Correct. With the exception of the query tool (for obvious reasons),
pgAdmin is designed to handle all the implementation details of SQL
generation etc. for you. Therefore, if you use mixed-case in any of
the object properties dialogues for values that are not expected to be
expressions, it will automatically quote them for you (in the correct
way, as sometimes the quoting rules are different depending on the
situation - e.g. comment strings vs. identifiers). So, entering a
table name of Log will result in:

CREATE TABLE "Log" ...

whilst entering a table name of log will give:

CREATE TABLE log ...

In the latter case, pgAdmin will omit the quotes as they are not
necessary. You can see what it's doing by looking at the SQL tab on
any properties dialogue.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgadmin-support by date:

Previous
From: David G Johnston
Date:
Subject: Re: PGAdmin for PostgreSQL 9.3 creates tables with double quotes embedded in the name
Next
From: "Matt Magoffin"
Date:
Subject: Copy/paste results in garbage if clipboard contains rich text on OS X