eulerto / pgquarrel

pgquarrel compares PostgreSQL database schemas (DDL)
BSD 3-Clause "New" or "Revised" License
389 stars 42 forks source link

Handle functions with a double dollar sign in the body #81

Open barkingfoodog opened 4 years ago

barkingfoodog commented 4 years ago

Check a function or procedure's body for the string $$ to see if it is safe for dollar-quoting the body. If found, expand the dollar quote until it is not found in the body.

eulerto commented 4 years ago

@barkingfoodog Why don't you use appendStringLiteralDQ instead of duplicating pg_dump code ?

barkingfoodog commented 4 years ago

Heh...because I didn't know about that function which is much nicer than what I wrote. I'll update this PR to use it when I get a chance in the next few days. Thanks for pointing out appendStringLiteralDQ!