Re: BUG #18866: Running pg_freespace() on views triggers an Abort
От | Tom Lane |
---|---|
Тема | Re: BUG #18866: Running pg_freespace() on views triggers an Abort |
Дата | |
Msg-id | 1618267.1743004859@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #18866: Running pg_freespace() on views triggers an Abort ("Euler Taveira" <euler@eulerto.com>) |
Ответы |
Re: BUG #18866: Running pg_freespace() on views triggers an Abort
Re: BUG #18866: Running pg_freespace() on views triggers an Abort |
Список | pgsql-bugs |
"Euler Taveira" <euler@eulerto.com> writes: > Your patch needs some adjustments. There is no need to include pg_class.h. I > don't like the proposed error message. I prefer saying the relation cannot be > opened because that's what will happen if it reaches this code path. I don't care for that proposal either: we just did open the relation ;-) Looking at other places where we throw an error for !RELKIND_HAS_STORAGE: rawpage.c: (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("cannot get raw page from relation \"%s\"", pgstatindex.c: (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("cannot get page count of relation \"%s\"", tid.c: errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot look at latest visible tid for relation \"%s.%s\"", relcache.c: elog(ERROR, "relation \"%s\" does not have storage", RelationGetRelationName(relation)); So the previous proposal was evidently modeled on the first two of these precedents. Personally I prefer messages that say *why* something failed, so I'd go with something more like "relation \"%s\" does not have storage". Use of errdetail_relkind_not_supported is fine though. regards, tom lane
В списке pgsql-bugs по дате отправления: