]> git.ipfire.org Git - thirdparty/psycopg.git/commit
feat: add sql.as_string(), sql.as_bytes() functions
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 26 Nov 2025 19:21:58 +0000 (20:21 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 27 Nov 2025 02:00:14 +0000 (03:00 +0100)
commitdfd43da862e543a25845516a533fd76a46d9f18d
tree638a7344cd4b3635766c9abfa01968dc815b0c1e
parentf88efc716b5099490b533a99a29dfb141ac14321
feat: add sql.as_string(), sql.as_bytes() functions

The functions are exported by the psycopg.sql module but are primarily
useful for template strings support, to allow building SQL queries
dynamically using t-strings.
psycopg/psycopg/_tstrings.py
psycopg/psycopg/sql.py
tests/test_sql.py
tests/test_tstring.py