Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-343

Implement locate function

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.8.0
    • Function/UDF
    • None

    Description

      Function definition

      int4 locate(string text, substr text, [, pos])
      

      Description

      Returns the position of the first occurance of substr in str after position pos

      • The result is one-based index.
      • If string or substr is null, the result should be null.
      • pos is one-based index.
      • pos cannot be a negative integer.
      • If 0 is given to pos, the function considers that pos is 1.
      • If there is no pos, the function considers that pos is 1.
      • If there is no matched substring, the result should be 0.

      Example

      SELECT locate('foobarbar', 'bar',5);
      -> 7
      

      Attachments

        1. TAJO-343.2.patch
          9 kB
          KyoungBok Lee
        2. TAJO-343.patch
          8 kB
          KyoungBok Lee

        Activity

          People

            deepblue.kblee KyoungBok Lee
            hyunsik Hyunsik Choi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: