This project is read-only.

pgsql keyword highlighting issues

Topics: Developer Forum, User Forum
Mar 12, 2012 at 8:41 PM

I am having issues getting pgsql highlighting to work within my program.  The only change I am making is setting configurationManager.Language = "pgsql".  I get correct highlighting on strings, numbers, and other non keyword characters.  I would expect that SELECT, FROM, WHERE, etc. would all get highlighted blue or some other color that is not black.  What am I doing wrong, if anything?


Mar 13, 2012 at 4:48 PM

I think what you're seeing is a combination of "by design" and a bug--double whammy!

The way "pgsql" is currently configured for the keywords you listed is:

<!--Keyword list 0 PostgreSQL Keywords  -->
<Style Name="WORD" ForeColor="black" bold="true" />

This comes from the "\ScintillaNET\Configuration\Builtin\pgsql.xml" file. As you can see the words are configured to be styled in black and hence that is probably part of your problem.

In my testing, I also noticed a bizarre behavior that I haven't had a chance to look into yet where I had to set configurationManager.Language = "pgsql" twice to get the complete effect. The first time styled most of the tokens, but setting it the second time picked up the other keywords you listed (albeit they were still black but now also bold as described above).

You can check my sanity by trying to set the Language property twice yourself and see if you get the same behavior. I've created issue 32402 to track resolution of this. Please report any additional findings there.



Mar 13, 2012 at 5:43 PM

Thanks for the help.  I was able to get it to work.  I also had to set the language property twice in order for it to work.  Once in the design view and once when the form loaded.

Thanks again!

Mar 13, 2012 at 10:39 PM

Good to hear.

I've also had time to determine the root cause. The Releases\2.4 and Trunk branches now include a fix if you would like to do your own build. Details are in issue 32402.