Issue with $ symbols in postgreSQL

Hi Team,

I am getting some issues with $ sign issues while running liquibase commands as below.

table3_insert.sql

–liquibase formatted sql
–changeset svemulur:tesing labels:stage

do
$do$
declare
temprow record;
begin
for temprow in select * from table1 where name = ‘Network’
loop
insert into table3_insert (role_id, scope_id, action_bits) values (temprow._id, (select _id from table2 where name = ‘cloud.rbac.coc.issues.systemalarms’), 3 ) ON CONFLICT DO NOTHING;
insert into table3_insert (role_id, scope_id, action_bits) values (temprow._id, (select _id from table2 where name = ‘cloud.rbac.coc.issues.systemalarms.realtime’), 3 ) ON CONFLICT DO NOTHING;
end loop;
end;
$do$;

– rollback no required;

===============

When I run liquibase command getting below errors.

Error:

Unexpected error running Liquibase: Migration failed for changeset test.sql::tesing::svemulur:
Reason: liquibase.exception.DatabaseException: Unterminated dollar quote started at position 4 in SQL do
$do$
declare
temprow record. Expected terminating $$ [Failed SQL: (0) do
$do$
declare
temprow record]

For more information, please use the --log-level flag

Can some please help me on this.

Regards,
Srinivas V