Обсуждение: purple letters

Поиск
Список
Период
Сортировка

purple letters

От
"Hibbard, Brandon"
Дата:

Hello,

 

I have a quick question on the code highlighting.  I often use a single character as an alias for tables in joins.  I have noticed that some letters are colored purple while others are black.  Is there a reason for this?  I have attached an image showing what I mean.  The image was taken from version 2.0-rc2.

 

Thanks,
Brandon

Вложения

Re: purple letters

От
Dave Page
Дата:


On Fri, Sep 22, 2017 at 1:53 PM, Hibbard, Brandon <Brandon.Hibbard@zimmerbiomet.com> wrote:

Hello,

 

I have a quick question on the code highlighting.  I often use a single character as an alias for tables in joins.  I have noticed that some letters are colored purple while others are black.  Is there a reason for this?  I have attached an image showing what I mean.  The image was taken from version 2.0-rc2.


Some weirdness from codemirror I suspect, but I have no idea what exactly. I think one of the other EDB guys looked at it's parser once, and may be able to suggest. 

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

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

Re: purple letters

От
Murtuza Zabuawala
Дата:
Hi,

The characters which are in purple colour are are valid SQL keywords hence highlighted by CodeMirror :-)


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Fri, Sep 22, 2017 at 6:38 PM, Dave Page <dpage@pgadmin.org> wrote:


On Fri, Sep 22, 2017 at 1:53 PM, Hibbard, Brandon <Brandon.Hibbard@zimmerbiomet.com> wrote:

Hello,

 

I have a quick question on the code highlighting.  I often use a single character as an alias for tables in joins.  I have noticed that some letters are colored purple while others are black.  Is there a reason for this?  I have attached an image showing what I mean.  The image was taken from version 2.0-rc2.


Some weirdness from codemirror I suspect, but I have no idea what exactly. I think one of the other EDB guys looked at it's parser once, and may be able to suggest. 

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

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

RE: purple letters

От
"Hibbard, Brandon"
Дата:

Thanks Dave and Murtuza,

 

I didn’t realize that they were SQL keywords.  Thanks for taking the time to answer my question. 

 

I am really liking the improvements to pgAdmin 4.  Keep up the good work!

 

From: Murtuza Zabuawala [mailto:murtuza.zabuawala@enterprisedb.com]
Sent: Friday, September 22, 2017 11:06 AM
To: Dave Page
Cc: Hibbard, Brandon; pgadmin-support@lists.postgresql.org
Subject: Re: purple letters

 

Hi,

 

The characters which are in purple colour are are valid SQL keywords hence highlighted by CodeMirror :-)

 


--

Regards,

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

Image removed by sender.

 

On Fri, Sep 22, 2017 at 6:38 PM, Dave Page <dpage@pgadmin.org> wrote:

 

 

On Fri, Sep 22, 2017 at 1:53 PM, Hibbard, Brandon <Brandon.Hibbard@zimmerbiomet.com> wrote:

Hello,

 

I have a quick question on the code highlighting.  I often use a single character as an alias for tables in joins.  I have noticed that some letters are colored purple while others are black.  Is there a reason for this?  I have attached an image showing what I mean.  The image was taken from version 2.0-rc2.

 

Some weirdness from codemirror I suspect, but I have no idea what exactly. I think one of the other EDB guys looked at it's parser once, and may be able to suggest. 

 

--

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

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

 

Re: purple letters

От
Darren Duncan
Дата:
For my part, when I designed my programming language, I intentionally did not 
use single-letter names for any keywords or reserved words or system-defined 
entities etc, and all built-ins were either 2+ letters or were symbols.  As a 
result, single-letter names are available/reserved for end users as barewords to 
name their own (presumably narrow-lexical-scope) stuff, without having to guess 
which letters they may use. -- Darren Duncan

On 2017-09-22 8:05 AM, Murtuza Zabuawala wrote:
> The characters which are in purple colour are are valid SQL keywords hence
> highlighted by CodeMirror :-)
> Ref: https://www.postgresql.org/docs/10/static/sql-keywords-appendix.html
>
>     On Fri, Sep 22, 2017 at 1:53 PM, Hibbard, Brandon
>     wrote:
>
>         I have a quick question on the code highlighting.  I often use a single
>         character as an alias for tables in joins.  I have noticed that some
>         letters are colored purple while others are black.  Is there a reason
>         for this?  I have attached an image showing what I mean.  The image was
>         taken from version 2.0-rc2.