Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2713

JDBC adapter may generate casts on PostgreSQL for VARCHAR type exceeding max length

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.18.0
    • Component/s: jdbc-adapter
    • Labels:
      None

      Description

      Varchar length in PostgreSQL cannot exceed 10485760, however Calcite may generate a cast with length larger than that number, resulting in an exception.

      org.postgresql.util.PSQLException: ERROR: length for type varchar cannot exceed 10485760
      

      From htup_details.h in postgresql:

      * MaxAttrSize is a somewhat arbitrary upper limit on the declared size of
      * data fields of char(n) and similar types.  It need not have anything
      * directly to do with the *actual* upper limit of varlena values, which
      * is currently 1Gb (see TOAST structures in postgres.h).  I've set it
      * at 10Mb which seems like a reasonable number --- tgl 8/6/00. */
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                jcamachorodriguez Jesus Camacho Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: