Re: sequence depends on many tables

Поиск
Список
Период
Сортировка
От Mariel Cherkassky
Тема Re: sequence depends on many tables
Дата
Msg-id CA+t6e1muOmnvyU7AzgCAx2RK1-8+YkKh5eo-csZETh1GGazbog@mail.gmail.com
обсуждение исходный текст
Ответ на Re: sequence depends on many tables  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: sequence depends on many tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Hey,
This is the full output with all the columns : 
 WITH
sequences AS
(
SELECT oid,relname FROM pg_class WHERE relkind = 'S'
)
SELECT s.oid as seq_oid,d.*
FROM pg_depend d,sequences s
where
s.oid = d.objid
and d.deptype = 'a'  and d.refobjid::regclass::text='table_A';
 seq_oid | classid | objid | objsubid | refclassid | refobjid | refobjsubid | deptype
---------+---------+-------+----------+------------+----------+-------------+---------
   17188 |    1259 | 17188 |        0 |       1259 |    17190 |           1 | a
   16566 |    2604 | 16566 |        0 |       1259 |    17190 |           1 | a
   16704 |    2606 | 16704 |        0 |       1259 |    17190 |           3 | a
   16704 |    2606 | 16704 |        0 |       1259 |    17190 |           5 | a
   16704 |    2606 | 16704 |        0 |       1259 |    17190 |           4 | a
(5 rows)


select *,refobjid::regclass from pg_depend where objid=16704;
 classid | objid | objsubid | refclassid | refobjid | refobjsubid | deptype |        refobjid
---------+-------+----------+------------+----------+-------------+---------+-------------------------
    1259 | 16704 |        0 |       2615 |     2200 |           0 | n       | 2200
    2606 | 16704 |        0 |       1259 |    17190 |           3 | a       | table_A
    2606 | 16704 |        0 |       1259 |    17190 |           5 | a       | table_A
    2606 | 16704 |        0 |       1259 |    17190 |           4 | a       | table_A
    1259 | 16704 |        0 |       1259 |    16706 |           1 | a       | table_B
(5 rows)

 select *,refobjid::regclass from pg_depend where objid=16566;
 classid | objid | objsubid | refclassid | refobjid | refobjsubid | deptype |       refobjid
---------+-------+----------+------------+----------+-------------+---------+-----------------------
    1259 | 16566 |        0 |       2615 |     2200 |           0 | n       | 2200
    1259 | 16566 |        0 |       1259 |    16568 |           2 | a       | table_C
    2604 | 16566 |        0 |       1259 |    17190 |           1 | a       | table_A
    2604 | 16566 |        0 |       1259 |    17188 |           0 | n       | table_A_seq
(4 rows)

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

Предыдущее
От: Edilmar Alves
Дата:
Сообщение: Re: Slow pg_publication_tables with many schemas and tables
Следующее
От: Mariel Cherkassky
Дата:
Сообщение: distinct on extract returns composite type