Identifying ALTER TABLE "sub-command"

From: Jeremy Finzel <finzelj(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Identifying ALTER TABLE "sub-command"
Date: 2018-01-11 15:56:32
Message-ID: CAMa1XUigsBC_kmeZaRte658k8L4S5q5fycvLk1eVKyYJn54U6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-01-11 15:59:52 Re: The first function call
Previous Message Tom Lane 2018-01-11 15:55:21 Re: CUBE seems a bit confused about ORDER BY