Tom Lane wrote: > I think Peter's got the error and the detail backwards. It should be > more like > > ERROR: "someview" cannot have constraints > DETAIL: "someview" is a view. > > If we do it like that, we need one ERROR message per error reason, > and one DETAIL per relkind, which should be manageable.
Hmm ... this works for me. Hopefully we'd have the "foo is a view" messages all centrally in pg_class.h (or maybe objectaddress, or some other central place). Then the "cannot have constraints" part would appear directly in whatever .c file is doing the check; no need to centralize in that case. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers