Re: Information schema sql_identifier

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Information schema sql_identifier
Дата
Msg-id 16a428e1-2535-e67e-1510-0ad0fc61ae8d@aklaver.com
обсуждение исходный текст
Ответ на Re: Information schema sql_identifier  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
On 12/22/20 4:33 PM, David G. Johnston wrote:
> On Tue, Dec 22, 2020 at 5:08 PM Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     SELECT pg_table_size(table_name::regclass)  from
>     information_schema.tables;
>     ERROR:  invalid name syntax
> 
>     So how does one go about using a table name from
>     information_schema.tables in pg_table_size()?
> 
> 
> Find that the function signature in the documentation requires an input 
> of "regclass" and ignore attempts to pass anything but that to the function.
> 
> pg_table_size ( regclass ) → bigint
> 
> I observe in v13 that the expected syntax works just fine:
> 
> select pg_table_size((table_schema || '.' || table_name)::regclass) from 
> information_schema.tables;

Yeah I tried that, didn't include in my previous post:

select pg_table_size((table_schema || '.' || table_name)::regclass) from 
information_schema.tables;
ERROR:  invalid name syntax

> 
> David J.


-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Information schema sql_identifier
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Information schema sql_identifier