Error With Postgres Function in DevOps Pipline RRS feed

  • Question

  • I'm getting the following error when trying to process a Postgres function in a DevOps Pipeline. The function compiles and works correctly when I run it PgAdmin4.

    It fails at this line: RETURNS integer AS $$

    The function is terminated with a $$. I run into the same problem with single quotes and escaping all the other single quotes.

    Error: Script block number: 0; Message: 42601: unterminated dollar-quoted string at or near "$$

    Tuesday, August 13, 2019 1:25 PM


  • Answer found.

    In the function I an insert into statement with a semicolon on the line below the where clause

    Where someColumn = 'someText'


    When I moved the semicolon to the end of the line like: Where someColumn = 'someText';

    the issue was resolved.

    • Marked as answer by Jamesp99 Tuesday, August 13, 2019 3:24 PM
    Tuesday, August 13, 2019 3:24 PM