Name of not null constraint is missing in error message
So far as I can tell the bit that goes CONSTRAINT NN_import_event__filename is just ignored.

the name nn_import_event__filename is not present when I dump the database, only the not-null attribute remains.

This does not match the the example given in the documentaion  which claims that it is possible to name a not null constraint.


  Define two NOT NULL column constraints on the table distributors, one of which is explicitly given a name:


CREATE TABLE distributors (
   did     integer CONSTRAINT no_null NOT NULL,
   name    varchar(40) NOT NULL
); 


So, you've found a bug.  if you report it it will probably be corrected fairly quickly, but the fix may be merely an update to the documentation.