r d <rd0002(at)gmail(dot)com> writes:
> The SQLSTATE 42P07 is described in the manual as only as "table undefined",
> and it is not clear if the intent is to allow or
> disallow the creation of a constraint called the same as the table in
> Postgresql.
Where do you see that? In Appendix A that code is listed as
"duplicate_table", which is exactly what the problem is (well, as long
as you know that tables and indexes share the same namespace in PG).
regards, tom lane