Re: BUG #7970: How 's list all members in a special tablespace ( not as pg_global & pg_default )

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: BUG #7970: How 's list all members in a special tablespace ( not as pg_global & pg_default )
Дата
Msg-id 5148742B.2030002@vmware.com
обсуждение исходный текст
Ответ на BUG #7970: How 's list all members in a special tablespace ( not as pg_global & pg_default )  (sunny99991982@yahoo.com.vn)
Список pgsql-bugs
On 19.03.2013 10:19, sunny99991982@yahoo.com.vn wrote:
> I tried this, which will get the list of tables belong to 'XYZ' tablespace.
>
> CREATE TABLESPACE TBS1 OWNER access LOCATION '/u03/tbs';
>
> -->  OK
>
> Create table public.SinhVien ( MaSV text, TenSV text, Sodt int ) tablespace
> TBS1;
>
> -->  OK
>
> Insert into public.SinhVien (MaSV,TenSV,Sodt) Values ('001','Nguyen
> Van',123456789),('002','Nguyen Ha',987654321);
>
> -->  OK
>
> select relname from pg_class where reltablespace=(select oid from
> pg_tablespace where spcname='TBS1');
>
>   relname
> ---------0
> (0 rows)
>
> why's return 0 rows ? i don't know

You didn't quote the tablespace name in the CREATE TABLESPACE statement,
so it's actually called tbs1, in lower case. Try:

select relname from pg_class where reltablespace=(select oid from
pg_tablespace where spcname='tbs1');

- Heikki

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

Предыдущее
От: sunny99991982@yahoo.com.vn
Дата:
Сообщение: BUG #7970: How 's list all members in a special tablespace ( not as pg_global & pg_default )
Следующее
От: v.tambovtsev@live.ru
Дата:
Сообщение: BUG #7971: Xml special symbols are not unescaped when gettting value of Xml via xpath