apache / apache/datafusion-sqlparser-rs
Add Postgres Create trigger support
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
We have a trigger that updates the field time
```sql
CREATE OR REPLACE FUNCTION updated_at() RETURNS trigger AS $$
BEGIN
IF (
NEW IS DISTINCT FROM OLD AND
NEW.updated_at IS NOT DISTINCT FROM OLD.updated_at
) THEN
NEW.updated_at := current_timestamp;
END IF;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
```
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue provides a PostgreSQL PL/pgSQL example but names no repository files, entry points, or tests. Locate the PostgreSQL CREATE TRIGGER parsing entry point and existing parser tests; done means the shown trigger-related SQL is accepted with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100