Jan Urbański <wulczer@wulczer.org> writes:
> I then tried to do the same for plerrcodes.h, but found discrepancies.
You shouldn't assume that errcodes.h necessarily includes all the info
needed to create the other two files.
The way I'd envision this working is that we have a master file
containing the five-letter SQLSTATE code, the ERRCODE macro name,
the string name to use in plerrcodes.h, and any other required items,
and then generate all three of the existing files from that.
regards, tom lane