Expose quote_literal_cstr() from core.
Robert Haas <rhaas@postgresql.org>
Expose quote_literal_cstr() from core. This eliminates the need for inefficient implementions of this functionality in both contrib/dblink and contrib/tablefunc, so remove them. The upcoming patch implementing an in-core format() function will also require this functionality. In passing, add some regression tests.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/dblink/dblink.c | modified | +0 −20 |
| contrib/tablefunc/tablefunc.c | modified | +0 −20 |
| src/backend/utils/adt/quote.c | modified | +53 −22 |
| src/include/utils/builtins.h | modified | +1 −0 |
| src/test/regress/expected/text.out | modified | +18 −0 |
| src/test/regress/sql/text.sql | modified | +3 −0 |