[PATCH] [REVIEW:3-5] fdo#45249 cannot use aggregate functions in with PostgreSQL

Lionel Elie Mamane lionel at mamane.lu
Thu Feb 9 09:44:53 PST 2012

With a PostgreSQL-SDBC database, Base query design does not allow the
user to use groupings and aggregate functions.

Change PostgreSQL-SDBC so that it declares to support Core SQL.

Please apply to libreoffice-3-5

See dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx


        if ( lcl_SupportsCoreSQLGrammar(xConnection) )
            xub_StrLen nCount   = m_aFunctionStrings.GetTokenCount();
            for (xub_StrLen nIdx = 0; nIdx < nCount; nIdx++)

where m_aFunctionStrings has been prepopulated by:

        IParseContext::InternationalKeyCode eFunctions[] = { IParseContext::KEY_AVG,IParseContext::KEY_COUNT,IParseContext::KEY_MAX

       for (size_t i = 0; i < SAL_N_ELEMENTS(eFunctions); ++i)
            m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
            m_aFunctionStrings += String(ByteString(rContext.getIntlKeywordAscii(eFunctions[i])),RTL_TEXTENCODING_UTF8);


and also


    if ( xConnection.is() )
        // Diese Funktionen stehen nur unter CORE zur Verf�gung
            // nur COUNT(*) erlaubt


More information about the LibreOffice mailing list