Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Which ESQL/C versions support SQL DESCRIBE OUTPUT?

    Posted 10/12/23 02:06 PM

    Hello!

    I try to find out in which ESQL/C version the OUTPUT option of the SQL DESCRIBE instruction was introduced.

    This would help us a lot to fix an issue very easily, but we want to be backward compatible with ESQL/C versions older than 4.50.

    The syntax of ESQL/C DESCRIBE seems only to be documented in Informix SQL syntax guide:

    https://www.ibm.com/docs/en/informix-servers/12.10?topic=statement-output-keyword

    Do I have only access to that?

    Any older doc available?

    Tx!

    Seb



    ------------------------------
    Sebastien FLAESCH
    ------------------------------


  • 2.  RE: Which ESQL/C versions support SQL DESCRIBE OUTPUT?

    Posted 10/12/23 02:18 PM

    Sabastien:

    It looks like the DESCRIBE INPUT and DESCRIBE OUTPUT features came in with engine version 9.40 which would correspond to CSDK 3.90 or 3.91 I believe going back to 2003 or there abouts.

    I don't have the 9.30 or earlier v9.xx manuals but it is documented as a new feature in the 9.40 Guide to SQL Syntax manual.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 3.  RE: Which ESQL/C versions support SQL DESCRIBE OUTPUT?

    Posted 10/13/23 04:20 AM

    Thank you Art for this info.

    Seb



    ------------------------------
    Sebastien FLAESCH
    ------------------------------



  • 4.  RE: Which ESQL/C versions support SQL DESCRIBE OUTPUT?

    Posted 10/16/23 06:28 AM

    Hello,

    Just found some old CSDKs 3.50.FC3 on our Solaris machine, and DESCRIBE OUTPUT exists in that version.

    For a quick check, you want to search for the API sqli_describe_output_stmt() in $INFORMIXDIR/incl/esql/sqliapi.h

    See generated .c code:

    /*
     *     EXEC SQL DESCRIBE OUTPUT :stmtName INTO tmp;
     */
    #line 138 "ifx91.ec"
      {
    #line 138 "ifx91.ec"
      sqli_describe_output_stmt(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, stmtName, 257), &tmp, 0);
    #line 138 "ifx91.ec"

    Seb



    ------------------------------
    Sebastien FLAESCH
    ------------------------------



  • 5.  RE: Which ESQL/C versions support SQL DESCRIBE OUTPUT?

    Posted 10/17/23 11:54 AM
    Support for describing output values from a DESCRIBE statement without the keyword OUTPUT has been in the product since it was first released circa 1987.

    Support for the explicit DESCRIBE OUTPUT (to parallel the explicit DESCRIBE INPUT) was coded in the server for version 9.40 in mid-2002 (PTS#151098, CQ idsdb00050261) and to ESQL/C 9.53 in mid-2002 (PTS#155706, CQ idsdb00054118).  There's also a bug for the JDBC driver version of the feature.

    So, code from IDS 9.40 onwards should support the feature.  If you're using software that doesn't support it, it is long past time to upgrade (a decade ago would have been a good idea, if a bit tardy).

    --
    Jonathan Leffler <jonathan.leffler@gmail.com>  #include <disclaimer.h>
    Guardian of DBD::Informix - v2018.1031 - http://dbi.perl.org
    "Blessed are we who can laugh at ourselves, for we shall never cease to be amused."





  • 6.  RE: Which ESQL/C versions support SQL DESCRIBE OUTPUT?

    Posted 10/17/23 12:02 PM

    Hello Jonathan!
    Thanks for the info.

    Seb



    ------------------------------
    Sebastien FLAESCH
    ------------------------------