apache / apache/datafusion-sqlparser-rs
Improve postgres CREATE FUNCTION support
- 主要语言
- Rust
- 星标
- 3.5k
- 派生
- 772
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 17
描述
Hey,
I'm trying to parse `CREATE FUNCTION` statements (PostgreSQL) with the following attributes:
```sql
CREATE OR REPLACE FUNCTION public.accounting_ids()
RETURNS SETOF uuid
LANGUAGE plpgsql
STABLE SECURITY DEFINER
SET search_path TO ''
AS $function$
```
A few features fail to parse:
1. `SETOF [type]` is not supported (Expected: end of statement, found: uuid at Line: 5, Column: 16)
2. `SECURITY DEFINER` is not supported (Expected: end of statement, found: SECURITY at Line: 7, Column: 9)
3. `SET search_path TO ''` is not supported (Expected: end of statement, found: SET at Line: 7, Column: 2)
Using sqlparser 0.50.0
贡献指南
这个仓库没有索引到贡献指南
调研方向
使用 sqlparser 0.50.0 重现 PostgreSQL 的 CREATE FUNCTION 示例,并定位 CREATE FUNCTION 的 parser 入口点。跟踪返回类型和函数属性的处理方式,然后为 SETOF uuid、SECURITY DEFINER 和 SET search_path TO '' 添加覆盖。完成标准是这三个构造都能成功解析。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- postgresql, rust
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100