https://bugs.freedesktop.org/show_bug.cgi?id=74172

--- Comment #10 from Julien Nabet <[email protected]> ---
I noticed that DECIMAL and NUMERIC were in fact subtypes.
Here's part of code from firebird (isql/isql.h=
// Integral subtypes

const int MAX_INTSUBTYPES       = 2;
static const SCHAR* Integral_subtypes[] = {
        "UNKNOWN",                               // Defined type, NTX: keyword
        "NUMERIC",                               // NUMERIC, NTX: keyword
        "DECIMAL"                                // DECIMAL, NTX: keyword
};

isql/extract.epp and isql/show.epp show that they're subtypes of SMALLINT,
INTEGER and BIGINT, example from first file :
    438 if (isqlGlob.major_ods >= ODS_VERSION10)
    439 {                                
    440     // Handle Integral subtypes NUMERIC and DECIMAL
    441     if ((FLD.RDB$FIELD_TYPE == SMALLINT) ||
    442        (FLD.RDB$FIELD_TYPE == INTEGER)  ||              
    443        (FLD.RDB$FIELD_TYPE == BIGINT))                  
    444     {                                    
    445        FOR FLD1 IN RDB$FIELDS WITH                      
    446         FLD1.RDB$FIELD_NAME EQ FLD.RDB$FIELD_NAME               
    447          /* We are ODS >= 10 and could be any Dialect */
    448          if (!FLD1.RDB$FIELD_PRECISION.NULL)                    
    449          {                                                      
    450              /* We are Dialect >=3 since FIELD_PRECISION is non-NULL */
    451              if (FLD1.RDB$FIELD_SUB_TYPE > 0 &&                         
    452               FLD1.RDB$FIELD_SUB_TYPE <= MAX_INTSUBTYPES)               
    453              {
    454                 sprintf (Print_buffer, "%s(%d, %d)",                    
    455                   Integral_subtypes[FLD1.RDB$FIELD_SUB_TYPE],           
    456                   FLD1.RDB$FIELD_PRECISION,                             
    457                   -FLD1.RDB$FIELD_SCALE);                               
    458                 precision_known = true;
    459              }
    460          }
    461       END_FOR
    462       ON_ERROR
    463         ISQL_errmsg (isc_status);
    464         return ps_ERR;
    465       END_ERROR;
    466     }
    467 }

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to