Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andreas Seltenreich <seltenreich(at)gmx(dot)de>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116
Date: 2016-06-07 06:23:15
Message-ID: CAB7nPqR_mJ60u3kyPeE__7o07AdADnS0G8BgkKCW52YmkP=f3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 5, 2016 at 11:01 PM, Andreas Seltenreich <seltenreich(at)gmx(dot)de> wrote:
> Creating some foreign tables via postgres_fdw in the regression db of
> master as of de33af8, sqlsmith triggers the following assertion:
>
> TRAP: FailedAssertion("!(((((const Node*)(var))->type) == T_Var))", File: "deparse.c", Line: 1116)
>
> gdb says var is holding a T_PlaceHolderVar instead. In a build without
> assertions, it leads to an error later:
>
> ERROR: cache lookup failed for type 0
>
> Recipe:
>
> --8<---------------cut here---------------start------------->8---
> create extension postgres_fdw;
> create server myself foreign data wrapper postgres_fdw;
> create schema fdw_postgres;
> create user mapping for public server myself options (user :'USER');
> import foreign schema public from server myself into fdw_postgres;
> select subq_0.c0 as c0 from
> (select 31 as c0 from fdw_postgres.a as ref_0
> where 93 >= ref_0.aa) as subq_0
> right join fdw_postgres.rtest_vview5 as ref_1
> on (subq_0.c0 = ref_1.a )
> where 92 = subq_0.c0;
> --8<---------------cut here---------------end--------------->8---

Open item for 9.6 added.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2016-06-07 06:52:15 Re: Prepared statements and generic plans
Previous Message Amit Langote 2016-06-07 06:06:40 Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116