Re: BUG #18866: Running pg_freespace() on views triggers an Abort
От | Euler Taveira |
---|---|
Тема | Re: BUG #18866: Running pg_freespace() on views triggers an Abort |
Дата | |
Msg-id | b6ea023a-703d-4afa-8561-9e867db1b5f0@app.fastmail.com обсуждение исходный текст |
Ответ на | Re: BUG #18866: Running pg_freespace() on views triggers an Abort (Tender Wang <tndrwang@gmail.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 |
On Tue, Mar 25, 2025, at 10:18 PM, Tender Wang wrote:
Thanks for the advice. Please see the attached patch.
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. This is an
existing message so no need for translation. The output will be like:
postgres=# SELECT pg_freespace('f', 0);
ERROR: cannot open relation "f"
DETAIL: This operation is not supported for foreign tables.
postgres=# SELECT pg_freespace('pg_roles', 0);
ERROR: cannot open relation "pg_roles"
DETAIL: This operation is not supported for views.
postgres=# SELECT pg_freespace('pg_class', 0);
pg_freespace
--------------
7520
(1 row)
I'm attaching a patch that includes these modifications.
Вложения
В списке pgsql-bugs по дате отправления: