On 5-7-2014 08:30, Mark Rotteveel wrote:
> For 2 (entirely based on the name), I'd propose:
> * dyn_no_priv (335545094): 42000 (syntax error or access rule violation)
>
> * dsql_cant_grant_option (336397330) : 42000 (syntax error or access
> rule violation), I had hoped there was a closer one, but there doesn't
> appear to be.

We may of course define our own sqlstate subclasses, as specified in 
SQL:2011 Foundation:
"
NOTE 572 — One consequence of this is that an SQL-implementation may, 
but is not required by ISO/IEC 9075 to, provide subclasses for exception 
condition syntax error or access rule violation that  distinguish 
between the syntax error and access rule violation cases.
"

Where implementation-defined subclass is defined as:

"
Subclass values associated with such classes that begin with one of the 
<digit>s '5', '6', '7', '8', or '9' or one of the <simple Latin upper 
case letter>s 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 
'T', 'U', 'V', 'W', 'X', 'Y', or 'Z' are reserved for 
implementation-defined conditions and are called implementation-defined 
subclasses.

[..]

If a subclass value is not specified for a condition, then either 
subclass '000' or an implementation-defined subclass is returned.
"

-- 
Mark Rotteveel

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to