apache / apache/datafusion-sqlparser-rs
Improve postgres CREATE FUNCTION support
- 主要言語
- Rust
- スター
- 3.5k
- フォーク
- 772
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 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 '' のカバレッジを追加します。3 つすべての構文を正常にパースできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- postgresql, rust
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100