apache / apache/datafusion-sqlparser-rs

Improve postgres CREATE FUNCTION support

Ouverte
#1,405 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
3.5k
Forks
772
Merge moyen
4 j 9 h
PR mergées (30 j)
17

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Reproduisez l’exemple PostgreSQL de CREATE FUNCTION avec sqlparser 0.50.0 et localisez le point d’entrée du parser pour CREATE FUNCTION. Suivez la manière dont les types de retour et les attributs des fonctions sont gérés, puis ajoutez une couverture pour SETOF uuid, SECURITY DEFINER et SET search_path TO ''. Le travail est terminé lorsque les trois constructions sont analysées avec succès.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
postgresql, rust
Domaine
databases
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.