The ecpglib major version (SO_MAJOR_VERSION) was changed in bd7c95f0c1a38becffceb3ea7234d57167f6d4bf (Add DECLARE STATEMENT support to ECPG.), but I don't see anything in that patch that would warrant that. I think we should undo that change.
-- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services