SQLA 16.20 Syntax Highlighting not working with dollar-quote escaping

Teradata Applications
Enthusiast

SQLA 16.20 Syntax Highlighting not working with dollar-quote escaping

I'm trying to compile an SP (function) with dollar-quote escaping:

 

-- TO-DO: Tighten up logic for returning/incrementing UserId values
CREATE OR REPLACE FUNCTION $DB_NAME$Views.SP_DCPUpsertUser (
    pUserId INTEGER, 
    pUserName VARCHAR(50), 
    pUserType CHAR(1), 
    pFirstName VARCHAR(100), 
    pLastName VARCHAR(100), 
    pDefaultSignatureScanFile BYTEA,
    pPhoneNumber VARCHAR(25),
    pEmailAddress VARCHAR(250),
    pPassword VARCHAR(128),
    pLast_Login TIMESTAMPTZ
) 
RETURNS INTEGER AS
$$
DECLARE NewUserId INTEGER; -- Track how many new users were created
BEGIN   

	IF(NewUserId IS NOT NULL) THEN
	    -- Get new userid
	    SELECT NextValue INTO NewUserId
	    FROM $DB_NAME$.NextId
	    WHERE IdType = 'User'
	    FOR UPDATE; -- Use "Update" row-lock so it is not read by any other queries also using "Update" row-lock
    END IF
    
    -- Upsert new user
    INSERT INTO $DB_NAME$.Users(UserId, UserName, UserType, FirstName, LastName, DefaultSignatureScanFile, PhoneNumber, EmailAddress, Password, Last_Login)
    VALUES(COALESCE(pUserId, NewUserId), pUserName, pUserType, pFirstName, pLastName, pDefaultSignatureScanFile, pPhoneNumber, pEmailAddress, pPassword, pLast_Login)
    ON CONFLICT(UserId) DO UPDATE SET
	    FirstName = EXCLUDED.FirstName,
	    LastName = EXCLUDED.LastName,
	    DefaultSignatureScanFile = EXCLUDED.DefaultSignatureScanFile,
        UserName = EXCLUDED.UserName,
        UserType = EXCLUDED.UserType,
	    PhoneNumber = EXCLUDED.PhoneNumber,
	    EmailAddress = EXCLUDED.EmailAddress,
	    Password = COALESCE(EXCLUDED.Password, Users.Password), -- If no value provided, keep existing one (i.e. don't allow NULL once set)
	    Last_Login = COALESCE(EXCLUDED.Last_Login, Users.Last_Login) -- If no value provided, keep existing one (i.e. don't allow NULL once set)
    ;   
    
    -- Increment UserId value
    UPDATE $DB_NAME$.NextId
    SET NextValue = NextValue + CASE WHEN pUserId IS NULL THEN 1 ELSE 0 END
    WHERE IdType = 'User'
    ;   
    
    RETURN NewUserId;   
END;
$$
LANGUAGE 'plpgsql';

The SP compiles fine in SQLA, but the SP body within the $$ bookends have no syntax highlighting and are treated as if they are literal text inside single quotes.  They're pink!  

 

I tried using a different escape name, like $BODY$, but then SQLA complains about "unterminated dollar-quoted string at or near "$BODY$".

 

Is there a setting in SQL so I can preserve the syntax highlighing here?  Or is there some ODBC setting?  Thanks.

 

SQLA 16.20.0.1

Postgres ODBC Driver 10.01.0000