Re: bug regclass::oid

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: bug regclass::oid
Дата
Msg-id fc6a3ada-db64-a6e1-b5d7-4f4b2882eb4c@aklaver.com
обсуждение исходный текст
Ответ на bug regclass::oid  (John Mikel <blpmftat@gmail.com>)
Ответы Re: bug regclass::oid  (John Mikel <blpmftat@gmail.com>)
Re: bug regclass::oid  (John Mikel <blpmftat@gmail.com>)
Список pgsql-general
On 6/13/19 8:14 AM, John Mikel wrote:
> * hi ,
>   i am here to tell you that this  test in query is not working when the
>   table name in the database or schema name   contain space
>   a.table_name::regclass=b.attrelid
> 
>   a is information_schema.columns
>   b is pg_attribute
> 
>   trying this in two different databases the first database contain table
>   with space in his name (Problem when running query)
>   the second no ( work fine)
> 
>   the same problme if you get Oid from schema name.
>   SELECT 'public'::regnamespace::oid;  work ;
>   create schema " this is test" ;
>   SELECT 'this is test'::regnamespace::oid;  not working ;

Try:

SELECT '"this is test"'::regnamespace::oid;  not working ;

Same for table name. As example:

select '"space table"'::regclass;
  regclass
---------------
  "space table"
(1 row)

> 
>   i have question how use join between  information_schema.columns and
>   pg_attribute ? thanks
> 
> regards*


-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: John Mikel
Дата:
Сообщение: bug regclass::oid
Следующее
От: Sourav Majumdar
Дата:
Сообщение: Re: Connection refused (0x0000274D/10061)