Hello
You can start with functions ATPrepCmd and ATExecCmd in src/backend/commands/tablecmds.c
Also note, one alter table statement can have multiple different actions.
 
Regards, Sergei


11.01.2018, 18:56, "Jeremy Finzel" <finz...@gmail.com>:
Hello -

I have found that in leveraging the parser code to decode DDL SQL, it is very easy to get which type of general command is being issued with CreateCommandTag(parsetree).  However, is there a way (or a starting point) to identify the sub-command as well i.e. ENABLE TRIGGER, ADD FOREIGN KEY, etc.?

Any direction is much appreciated.

Thanks,
Jeremy

Reply via email to