My program (indirectly) calls the following function twice, tuple = SearchSysCache(STATRELATT, ObjectIdGetDatum(relid), Int16GetDatum(colnum), 0, 0); The first time it assigns NULL to tuple, while the second time it assigns a valid pointer. Why is it like that? BTW, my program only optimize query plan without executing it. Thanks.
uwcssa <uwcssa@gmail.com> writes:
> My program (indirectly) calls the following function twice,
> tuple = SearchSysCache(STATRELATT, ObjectIdGetDatum(relid),
> Int16GetDatum(colnum), 0, 0);
> The first time it assigns NULL to tuple, while the second time it
> assigns a valid pointer. Why is it like that?
You did an ANALYZE in between, perhaps? That's the only operation
that puts new rows in pg_statistic.
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера