-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault when qual on view using expressions #5
Labels
Comments
After fixing this problem, it looks like there's also an infinite recursion in https://github.com/dalibo/pg_qualstats/blob/master/pg_qualstats.c#L1734 which isn't triggered by this simplified test case. The original sqlsmith query raising both issue (on regression database) is: select
ref_33.nslots as c0
from
(select
74 as c0
from
pg_catalog.pg_ts_parser as sample_0 tablesample system (6.4)
where 96 = 78
limit 174) as subq_0
left join regress_rls_schema.rls_tbl_force as ref_31
inner join public.credit_usage as sample_28 tablesample system (5.3)
on (ref_31.c1 = sample_28.cid )
inner join public.shoe_ready as ref_32
right join public.hub as ref_33
on (ref_32.total_avail = ref_33.nslots )
on (sample_28.usage = ref_32.sh_avail )
left join public.check_tbl as ref_34
inner join pg_catalog.pg_class as sample_29 tablesample system (8.5)
on (ref_34.x = sample_29.relpages )
on (ref_32.total_avail = ref_34.x )
left join (select
ref_35.stuff as c0
from
public.thethings as ref_35
where public.max_xacttest() is not NULL
limit 72) as subq_15
inner join pg_catalog.pg_ts_config_map as sample_30 tablesample bernoulli (7.3)
on (subq_15.c0 = sample_30.maptokentype )
on (ref_32.sl_avail = sample_30.maptokentype )
on (subq_0.c0 = ref_34.x )
where ref_31.c1 >= sample_28.usage
limit 8; |
This should be fixed by dalibo@e0ddf70 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found with sqlsmith. Minimal test case to reproduce:
At least, pgqs_resolve_var() doesn't handle get_tle_by_resno() returning NULL.
The text was updated successfully, but these errors were encountered: