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

Google translator unexpected behavior for view update without trigger

    XMLWordPrintable

Details

    • Hide
      • INSERT INTO SmallA_Direct (IntKey, StringKey, IntNum, StringNum) VALUES (1, '1', 1, '1'), (2, '2', 2, '2'), (3, '3', 3, '3'), (4, '4', 4, '4'), (5, '5', 5, '5')
      • UPDATE SmallA_Direct SET intnum = 1001 WHERE Intkey >= 3
      • SELECT IntKey, StringKey, IntNum, StringNum from smalla_direct
      Show
      INSERT INTO SmallA_Direct (IntKey, StringKey, IntNum, StringNum) VALUES (1, '1', 1, '1'), (2, '2', 2, '2'), (3, '3', 3, '3'), (4, '4', 4, '4'), (5, '5', 5, '5') UPDATE SmallA_Direct SET intnum = 1001 WHERE Intkey >= 3 SELECT IntKey, StringKey, IntNum, StringNum from smalla_direct
    • Hide

      Create trigger for update

      Show
      Create trigger for update

    Description

      If there is a view (CRUD.SmallA_Direct) which defines only a subset of foreign table (Source.SmallA) columns, there needs to be defined a trigger for update to work correctly. Otherwise unexpected results are returned after executing update:

      • for updated rows, it converts String columns of SmallA_Direct to decimal numbers,
      • for not updated rows it returns null for String columns

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-shawkins Steven Hawkins
              lfabriko@redhat.com Lucie Krejcirova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: