Replies: 1 comment
-
wrong repo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I found myself needing to do some SQL templating and discovered that duckdb doesn't have any obvious mechanism to format literals
with postgres's format function would return
It would be awesome to be able to do something like the following:
I think the function that would need to be exposed is
Value::ToSQLString()
More broadly, support for templating via SQL is somewhat lacking. For instance there is no way to execute a multi-statement script generated from a macro via sql or to load a script from file within another sql file. As duckdb does not currently support multiple inserts and updates within a CTE, templating is necessary when you want to avoid having to write logic in the client. Since duckdb shines in the emdedded use case, keeping logic within SQL is more feasible than with server-side Postgres stored procedures which must potentially be reconciled with multiple codebase -so improved SQL templating functionality in DuckDB would be of great value.
Beta Was this translation helpful? Give feedback.
All reactions