trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhu, Wen-Jun" <>
Subject 答复: issues on error message
Date Fri, 27 Apr 2018 02:56:02 GMT
Hi Dave,

Great, thank you.

发件人: Dave Birdsall <> 
发送时间: 2018年4月25日 2:35
主题: RE: issues on error message


I've added a new How-To page on the Trafodion wiki with the information from this e-mail exchange.
You can find it here:



-----Original Message-----
From: Zhu, Wen-Jun <> 
Sent: Wednesday, April 11, 2018 7:06 PM
Subject: 答复: issues on error message

Hi, Dave and Selva,

Thank you for your answers.

发件人: Dave Birdsall <>
发送时间: 2018年4月10日 23:52
主题: RE: issues on error message


Yes! Glad you asked.

The error message numbers are organized by what part of the software raises them.

Messages 1000 - 1999 are raised by the DDL code (core/sql/sqlcomp/* modules) -- use the enum
in sqlcomp/CmpDDLCatErrorCodes.h Messages 2000 - 2999 are raised by the mainline code of the
SQL compiler process (core/sql/arkcmp/* modules + the core/sql/sqlcomp/* modules that aren't
DDL modules) Messages 3000 - 3999 are raised by the parser code (core/sql/parser/*) Messages
4000 - 4999 are raised by the binder code (core/sql/optimizer/Bind*) Messages 5000 - 5999
are raised by the normalizer code (core/sql/optimizer/Norm*) Messages 6000 - 6999 are raised
by the optimizer code (core/sql/optimizer/ <everything else> ) -- use the enum in optimizer/opt_error.h
Messages 7000 - 7999 are raised by the generator code (core/sql/generator/*) Messages 8000
- 8999 are raised by the executor code (core/sql/executor/* and core/sql/exp/*) -- use the
enum in exp/ExpErrorEnums.h Messages 9200 - 9299 are raised by the update statistics code
(core/sql/ustat/*) -- use the enum in ustat/hs_const.h Messages 10000 - 10049 are raised by
the run-time sort code (core/sql/sort/*) -- use the enum in sort/SortError.h Messages 11100
- 11399 are raised by the UDR server and language manager code (core/sql/udrserv/*) -- use
the num in udrserv/udrdefs.h

As you can see, not all of the error message ranges have corresponding enum files; we did
not have a unified convention for this when we originally wrote the code unfortunately.

When you add an error message, be sure to also add a description to the SQL Messages Guide.
See for the latest version. The
source for it can be found in $TRAF_HOME/../../docs/messages_guide/src/asciidoc/_chapters.


-----Original Message-----
From: Zhu, Wen-Jun <>
Sent: Tuesday, April 10, 2018 1:39 AM
Subject: issues on error message


I am trying to add some error message in SqlciErrors.txt when new error happens.
As far as I know, it uses message catalog, and the error number is a enum in CmpDDLCatErrorCodes.h.

I guess there is a map between these two files, but it is not exactly mapped.

Are there rules about this? Like feed DgSqlCode constructor with enum, not magic number, or
something like this And what should I take care of?

View raw message