atom / language-sql

SQL package for Atom
Other
38 stars 50 forks source link

Trigger / Procedure related keywords #66

Open Richie765 opened 7 years ago

Richie765 commented 7 years ago

Could trigger / procedure related keywords be implemented? Here are a couple of them:

before delete on
after delete on
before update on
after update on
before insert on
after insert on

for each row
execute procedure
returns trigger
return
language plpgsql

perform
raise exception

if
elsif
else
end if

Thanks!

winstliu commented 7 years ago

Do you know which SQL variants support these keywords?

Cxarli commented 7 years ago

Seems to be PostgreSQL (at least language plpgsql is)

Richie765 commented 7 years ago

The list was meant for PostgreSQL, but most of them are also valid for MySQL. As far as I can tell, the following ones are PostgreSQL specific:

execute procedure
returns trigger
return
language plpgsql
perform
raise exception