I said:
> This will generate the problem:
> create table t1 (f1 int primary key);
> create table t2 (f1 int references t1);
Actually, I find that I get the double declaration of t1_pkey even
without t2. Either we're not using quite the same sources, or the
problem is platform-dependent. I can dig into it if you cannot
reproduce it ...
regards, tom lane