apache / apache/datafusion-sqlparser-rs
Improve postgres CREATE FUNCTION support
- Lingua principale
- Rust
- Stelle
- 3.5k
- Fork
- 772
- Merge medio
- 4g 9h
- PR unite (30g)
- 17
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Riproduci l'esempio PostgreSQL di CREATE FUNCTION con sqlparser 0.50.0 e individua il punto di ingresso del parser per CREATE FUNCTION. Traccia la gestione dei tipi restituiti e degli attributi delle funzioni, quindi aggiungi la copertura per SETOF uuid, SECURITY DEFINER e SET search_path TO ''. Il lavoro è completato quando tutte e tre le costruzioni vengono analizzate correttamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- postgresql, rust
- Ambito
- databases
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100