Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3888

Redshift - there is not function SUBSTR (RS uses SUBSTRING)

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 8.12.3
    • Fix Version/s: 8.13, 8.12.4
    • Component/s: JDBC Connector
    • Labels:
      None
    • Environment:

      driver - PostgreSQL 9.2
      translator - postgresql

    • Steps to Reproduce:
      Hide

      Query: SELECT INTKEY, LEFT(INTKEY, 2) FROM BQT1.SmallA ORDER BY INTKEY
      Source-specific query: SELECT g_0.intkey AS c_0, SUBSTR(cast(g_0.intnum AS varchar(4000)), 1, 1) AS c_1 FROM smalla AS g_0 ORDER BY c_0

      Show
      Query: SELECT INTKEY, LEFT(INTKEY, 2) FROM BQT1.SmallA ORDER BY INTKEY Source-specific query: SELECT g_0.intkey AS c_0, SUBSTR(cast(g_0.intnum AS varchar(4000)), 1, 1) AS c_1 FROM smalla AS g_0 ORDER BY c_0
    • Bugzilla Update:
      Perform

      Description

      Postgresql translator uses SUBSTR function to get substring of string (e.g. function LEFT(x,y)), but Redshift does not support function SUBSTR. It support SUBSTRING function instead.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  shawkins Steven Hawkins
                  Reporter:
                  jdurani Juraj Duráni
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: