Fix pgstattuple/pgstatindex to use regclass-type as the argument
Вложения
В списке pgsql-hackers по дате отправления:
| От | Satoshi Nagayasu |
|---|---|
| Тема | Fix pgstattuple/pgstatindex to use regclass-type as the argument |
| Дата | |
| Msg-id | 5132EED7.9060304@uptime.jp обсуждение исходный текст |
| Ответы |
Re: Fix pgstattuple/pgstatindex to use regclass-type as the argument
|
| Список | pgsql-hackers |
Hi, As I wrote before, I'd like to clean up pgstattuple functions to allow the same expressions. Re: [HACKERS] [RFC] pgstattuple/pgstatindex enhancement http://www.postgresql.org/message-id/511EE19B.5010004@uptime.jp My goal is to allow specifying a relation/index with several expressions, 'relname', 'schemaname.relname' and oid in all pgstattuple functions. pgstatindex() does not accept oid so far. I have found that the backward-compatibility can be kept when the arguments (text and/or oid) are replaced with regclass type. regclass type seems to be more appropriate here. So, I cleaned up those three functions, pgstattuple(), pgstatindex(), pg_relpages(), to accept a regclass-type argument, instead of using text and/or oid type, as the test cases show. select * from pgstatindex('test_pkey'); select * from pgstatindex('public.test_pkey'); select * from pgstatindex('myschema.test_pkey'); select * from pgstatindex('myschema.test_pkey'::regclass::oid); With attached patch, all functions in the pgstattuple module can accept the same expression to specify the target relation/index. Any comments or suggestions? Regards, -- Satoshi Nagayasu <snaga@uptime.jp> Uptime Technologies, LLC. http://www.uptime.jp
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера