Need help (unterminated dollar-quoted string at or near "$$ LANGUAGE plpgsql IMMUTABLE; ")

Поиск
Список
Период
Сортировка
От Hitesh Varule
Тема Need help (unterminated dollar-quoted string at or near "$$ LANGUAGE plpgsql IMMUTABLE; ")
Дата
Msg-id CAHM4AP-9+dnQO7_BB3GNL8_mpduvA8vw1h7qjx_rcyY7JSpVpA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Need help (unterminated dollar-quoted string at or near "$$ LANGUAGE plpgsql IMMUTABLE; ")  (Rob Richardson <RDRichardson@rad-con.com>)
Список pgsql-novice
Hi,

Need your help.

we have created a function similar to below:

CREATE OR REPLACE FUNCTION aud_status_to_flag(aud_status character) RETURNS integer AS $$
DECLARE
auditflag integer;

BEGIN
CASE aud_status
WHEN 'C' THEN
auditflag = 1;
WHEN 'U' THEN
auditflag = 2;
WHEN 'D' THEN
auditflag = 3;
ELSE
CASE
WHEN aud_status SIMILAR TO '[0-9]+' THEN
auditflag = CAST(aud_status as integer);
ELSE
auditflag = 0;
END CASE;
END CASE;
RETURN auditflag;
END;
$$ LANGUAGE plpgsql IMMUTABLE;


If we run the script through INSTALL-SHIELD then we get an error message like "unterminated dollar-quoted string at or near "$$ LANGUAGE plpgsql IMMUTABLE; "

we did change the function to STABLE but that didn't solve the problem. Also, we did put everything in single quoted strings but that as well didn't resolve the issue.


Please can you let me know what should we do to run script successfully through INSTALLSHIELD?

Appreciate your help.

Thank you,
Hitesh

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Details of Segmentation Fault
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Details of Segmentation Fault