SQL
Limitations
#### Using Named Parameters {#docs:sql:statements:create_macro::using-named-parameters}  
Currently, positional macro parameters can only be used positionally, and named parameters can only be used by supplying their name. Therefore, the following will not work:  
```sql
CREATE MACRO my_macro(a, b := 42) AS (a + b);
SELECT my_macro(32, 52);
```  
```console
Error: Binder Error: Macro function 'my_macro(a)' requires a single positional argument, but 2 positional arguments were provided.
```  
#### Using Subquery Macros {#docs:sql:statements:create_macro::using-subquery-macros}  
If a `MACRO` is defined as a subquery, it cannot be invoked in a table function. DuckDB will return the following error:  
```console
Binder Error: Table function cannot contain subqueries
```  
#### Overloads {#docs:sql:statements:create_macro::overloads}  
Overloads for macro functions have to be set at creation, it is not possible to define a macro by the same name twice without first removing the first definition.