Re: Adding Node support in outfuncs.c and readfuncs.c - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Adding Node support in outfuncs.c and readfuncs.c
Date
Msg-id m2vcqqg9fa.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Adding Node support in outfuncs.c and readfuncs.c  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Adding Node support in outfuncs.c and readfuncs.c
List pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> What about adding that into src/tools/editors/pgsrc.el?

Of course after having used it some more, I fixed a bug and added a
function to start from the readfunc node name rather than the enum node
number in the interactive calls.

Please find attached a newer version of the pgsrc.el file, in case it is
to get included.  Also note that it's possible to just use those read
only commands:

  M-x pgsrc:get-node-name RET 718 RET
  Node 718 is T_DropStmt.

  M-x pgsrc:get-node-number RET COLUMNDEF RET
  Node COLUMNDEF is 917 in enum NodeTag.

Also, the code generated is not handling the more complex case, for
example I had to adapt of rewrite some nodes (the constraint reading is
not something easy to generate from a script).  But even with such
limitations, I still find the tool helping a lot.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Allow substitute allocators for PGresult.
Next
From: Dimitri Fontaine
Date:
Subject: Re: Multiple Extensions