Re: BUG #16670: pgstattuple ERROR: relation "sql_implementation_info" does not exist
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #16670: pgstattuple ERROR: relation "sql_implementation_info" does not exist |
| Дата | |
| Msg-id | 3599891.1602686317@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG #16670: pgstattuple ERROR: relation "sql_implementation_info" does not exist (PG Bug reporting form <noreply@postgresql.org>) |
| Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes:
> # select tablename,
> (pgstattuple_approx(tablename::regclass)).approx_free_space from pg_tables
> where schemaname = 'public' and
> (pgstattuple_approx(tablename::regclass)).approx_free_percent > 10;
> ERROR: relation "sql_implementation_info" does not exist
This is not a bug. We don't guarantee anything about the evaluation
order of WHERE clauses. Even if we did, this query has got bugs of
its own: it will fail on tablenames that would require quoting,
such as names containing spaces, dots, uppercase letters, etc.
You could write
(quote_ident(schemaname)||'.'||quote_ident(tablename))::regclass
to avoid both of those issues. There are still going to be some race
condition problems around just-dropped tables, though.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера