Re: SQL Syntax Highlight Configuration

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Maga Abdurakhmanov <maqdev(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: SQL Syntax Highlight Configuration
Date: 2010-02-10 11:18:10
Message-ID: 4B7295F2.7090700@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Le 09/02/2010 22:48, Maga Abdurakhmanov a écrit :
>>
>>
>> * "Element colour x" doesn't mean anything to our users, the text
>> should be replaced with a better text (for example "SQL words",
>> "Text literals", or something better)
>>
>>
> Anybody can help with this?

Not me at least. I don't know quite more about this.

> I've found some description of elements in STC
> sources, but still have questions.
>
> Do we really need SCE_SQL_SQLPLUS and SCE_SQL_SQLPLUS_PROMPT ? If do, then I
> need some appopriate description for configuration dialog.
>

They can be used, so yes, we need them. Perhaps Dave can tell us more
about them ?

> Values 0 - 11 are used in pgadmin sources as a 1-12 colour elements
> relatively.
> Within a bracket's i give my own description. Here is a full list of
> elements defined in SQL lexer for STC control:
>
> #define SCE_SQL_DEFAULT 0 (I guess we should use just foregreound color
> (don't need to configure)
> #define SCE_SQL_COMMENT 1 (multiline SQL comment)
> #define SCE_SQL_COMMENTLINE 2 (single line SQL comment)
> #define SCE_SQL_COMMENTDOC 3 (SQL doc within a comment)
> #define SCE_SQL_NUMBER 4 (number)
> #define SCE_SQL_WORD 5 (SQL keyword)
> #define SCE_SQL_STRING 6 (double quoted string)
> #define SCE_SQL_CHARACTER 7 (single quoted string)
> #define SCE_SQL_SQLPLUS 8 (??)
> #define SCE_SQL_SQLPLUS_PROMPT 9 (??)
> #define SCE_SQL_OPERATOR 10 (operator)
> #define SCE_SQL_IDENTIFIER 11 (identifier)
>
> #define SCE_SQL_SQLPLUS_COMMENT 13
> #define SCE_SQL_COMMENTLINEDOC 15
> #define SCE_SQL_WORD2 16
> #define SCE_SQL_COMMENTDOCKEYWORD 17
> #define SCE_SQL_COMMENTDOCKEYWORDERROR 18
> #define SCE_SQL_USER1 19
> #define SCE_SQL_USER2 20
> #define SCE_SQL_USER3 21
> #define SCE_SQL_USER4 22
> #define SCE_SQL_QUOTEDIDENTIFIER 23
>

AFAIR, we only use from 0 to 11. And apart from 8 and 9, all are simple
to understand. If we don't have a better answer from Dave, we could
probably drop them (use the old value, and don't customize it).

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2010-02-10 13:26:07 Re: Ticket 128: Hot Standby and Streaming Replication
Previous Message pgAdmin Trac 2010-02-09 22:34:44 [pgAdmin III] #136: VACUUM FULL INPLACE is not available anymore