On Thu, Jan 12, 2017 at 7:56 PM, Amit Kapila <amit.kapil...@gmail.com> wrote:
> Okay, done that way.  I have fixed the review comments raised by Dilip
> as well and added the test case in attached patch.

I have tested with pq_pushdown_subplan_v2.patch +
pq_pushdown_correl_subplan_v1.patch

sqlsmith. is reporting below error, I have attached the query to
reproduce the issue. This issue is only coming when both the patch is
applied, only with pq_pushdown_subplan_v2.patch there is no problem.
So I think the problem is because of
pq_pushdown_correl_subplan_v1.patch.

ERROR:  did not find '}' at end of input node at character 762

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
select  
          subq_2.c1 as c0, 
          25 as c1
        from 
          (select  
                pg_catalog.random() as c0, 
                31 as c1, 
                ref_3.prsend as c2, 
                subq_1.c2 as c3
              from 
                (select  
                        (select page from pg_catalog.pg_locks limit 1 offset 10)
         as c0, 
                        9 as c1, 
                        sample_1.opfname as c2, 
                        sample_1.opfnamespace as c3
                      from 
                        pg_catalog.pg_opfamily as sample_1 tablesample 
bernoulli (5.4) ,
                        lateral (select  
                              57 as c0, 
                              7 as c1
                            from 
                              pg_catalog.pg_amop as sample_2 tablesample system 
(8.7) 
                            where 54 > (select character_maximum_length from 
information_schema.element_types limit 1 offset 28)
        
                            limit 8) as subq_0
                      where (((pg_catalog.pg_postmaster_start_time() < 
pg_catalog.pg_stat_get_snapshot_timestamp()) 
                            and (subq_0.c0 is not NULL)) 
                          and (pg_catalog.pg_backend_pid() <> 30)) 
                        or (subq_0.c0 >= (select active_pid from 
pg_catalog.pg_replication_slots limit 1 offset 9)
        )
                      limit 167) as subq_1
                  inner join pg_catalog.pg_ts_parser as ref_3
                  on (subq_1.c2 = ref_3.prsname )
              where subq_1.c1 <= subq_1.c0
              limit 56) as subq_2,
          lateral (select  
                subq_2.c0 as c0
              from 
                pg_catalog.pg_statistic as sample_3 tablesample bernoulli (2.3) 
              where (EXISTS (
                  select  
                      pg_catalog.pg_trigger_depth() as c0, 
                      sample_4.comments as c1
                    from 
                      information_schema.sql_sizing_profiles as sample_4 
tablesample bernoulli (9.9) 
                    where (pg_catalog.statement_timestamp() is not NULL) 
                      and (((((((select character_maximum_length from 
information_schema.domains limit 1 offset 40)
         < 7) 
                                or ((((((select ordinal_position from 
information_schema.parameters limit 1 offset 21)
         = sample_4.sizing_id) 
                                        or (sample_4.sizing_id <> 
sample_4.required_value)) 
                                      or (sample_4.sizing_id <= 
pg_catalog.pg_stat_get_buf_alloc())) 
                                    and 
((pg_catalog.pg_stat_get_bgwriter_buf_written_checkpoints() <> 
pg_catalog.gin_cmp_tslexeme(
                                          cast(pg_catalog.timeofday() as text),
                                          cast(null as text))) 
                                      and (sample_4.profile_id is NULL))) 
                                  or ((select ordinal_position from 
information_schema.attributes limit 1 offset 31)
         < sample_4.sizing_id))) 
                              and (sample_4.sizing_id <= sample_4.sizing_id)) 
                            or (sample_4.sizing_id <> 40)) 
                          and ((sample_4.required_value <> sample_4.sizing_id) 
                            and (false))) 
                        or (((pg_catalog.int8range_canonical(
                                cast(null as int8range)) is not NULL) 
                            and (sample_4.required_value >= 58)) 
                          and (((select objsubid from pg_catalog.pg_seclabel 
limit 1 offset 1)
         is NULL) 
                            and (((select typtypmod from pg_catalog.pg_type 
limit 1 offset 32)
         <= (select character_maximum_length from 
information_schema.element_types limit 1 offset 33)
        ) 
                              or (13 <= 9)))))
                    limit 67)) 
                and ((27 <= (select sourceline from pg_catalog.pg_settings 
limit 1 offset 6)
        ) 
                  or (sample_3.staattnum <= subq_2.c1))
              limit 52) as subq_3
        where true;
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to