Re: wrong relkind error messages

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: wrong relkind error messages
Дата
Msg-id 01d4fd55-d4fe-5afc-446c-a7f99e043f3d@enterprisedb.com
обсуждение исходный текст
Ответ на wrong relkind error messages  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: wrong relkind error messages  (Michael Paquier <michael@paquier.xyz>)
Re: wrong relkind error messages  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On 13.04.20 15:54, Peter Eisentraut wrote:
> I'm not a fan of error messages like
> 
>      relation "%s" is not a table, foreign table, or materialized view
> 
> It doesn't tell me what's wrong, it only tells me what else could have 
> worked.  It's also tedious to maintain and the number of combinations 
> grows over time.

Another go at this.  I believe in the attached patch I have addressed 
all the feedback during this thread last year.  In particular, I have 
rephrased the detail message per discussion, and I have improved the 
messages produced by ATSimplePermissions() with more details.  Examples:

  CREATE STATISTICS tststats.s2 ON a, b FROM tststats.ti;
-ERROR:  relation "ti" is not a table, foreign table, or materialized view
+ERROR:  cannot define statistics for relation "ti"
+DETAIL:  This operation is not supported for indexes.

  ALTER FOREIGN TABLE ft1 ALTER CONSTRAINT ft1_c9_check DEFERRABLE; -- ERROR
-ERROR:  "ft1" is not a table
+ERROR:  ALTER action ALTER CONSTRAINT cannot be performed on relation "ft1"
+DETAIL:  This operation is not supported for foreign tables.

There might be room for some wordsmithing in a few places, but generally 
I think this is complete.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench logging broken by time logic changes
Следующее
От: Greg Nancarrow
Дата:
Сообщение: Re: Added schema level support for publication.