While trying to add something useful into INSERT statement, I wrote more simple example, just to find out how it should work.
I think this might be helpful to people that also want to hack into that area.
Example is very simple, it adds keyword TEST into the definition of attribute list into CREATE INDEX statement, and in ComputeIndexAttrs it says using elog(WARNING ...) whether it found TEST keyword or not.
This example is not for production development, it just shows what part of code you should touch in order to modify grammar.
( grammar_example.diff )
I think this might be helpful to people that also want to hack into that area.
Example is very simple, it adds keyword TEST into the definition of attribute list into CREATE INDEX statement, and in ComputeIndexAttrs it says using elog(WARNING ...) whether it found TEST keyword or not.
postgres=# create index ON mytable (i TEST 'value'); WARNING: Creating index for column i with TEST value CREATE INDEX postgres=# create index ON mytable (i); WARNING: TEST is empty CREATE INDEX
This example is not for production development, it just shows what part of code you should touch in order to modify grammar.
( grammar_example.diff )