Writes

render is a SQL macro, and DML inside CREATE MACRO … AS TABLE is a parser error, so a route cannot INSERT. Two ways round it:

SET GLOBAL duckweb_render_function = 'my_ext_render';

The transport reads current_setting('duckweb_render_function') rather than hardcoding render, so an app that needs to write is a configuration change rather than a fork. It defaults to render. It stays a setting because the wasm tier reads it too, where there is no server to pass an argument to; a single server can still override it with duckweb_serve’s render option.

notesapp is that, worked through: a table function that inserts during bind on a connection of its own, builds its response with duckweb-core, and is served by pointing the setting at it. Its test posts a note over HTTP and reads it back.