Hacker News new | ask | show | jobs
by gregn610 1266 days ago
I've found text manipulation of SQL can quickly degenerate into a nightmare of concatenation, nested quoting & escaping.

I wrote up Using plain Jinja[1] or SQLAlchemy+Jinja[2] as complementary techniques. The post is a bit dated but the principles should still work.

- [1](https://github.com/gregn610/plpgsql/wiki/meta-sql-with-pytho...)

- [2](https://github.com/gregn610/plpgsql/wiki/meta-sql-with-pytho...)