Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1RGY-0004oP-3J for pgsql-general@arkaria.postgresql.org; Wed, 06 Mar 2019 07:47:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h1RGV-0001Br-Li for pgsql-general@arkaria.postgresql.org; Wed, 06 Mar 2019 07:46:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1RGV-00016l-7C for pgsql-general@lists.postgresql.org; Wed, 06 Mar 2019 07:46:59 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1RFZ-0003Ub-4o for pgsql-general@lists.postgresql.org; Wed, 06 Mar 2019 07:46:58 +0000 Received: by mail-pg1-x544.google.com with SMTP id h11so7706600pgl.0 for ; Tue, 05 Mar 2019 23:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=Zm+yxaXC4j0bflQxITvcr56h79k4qfhTXv48uDydZoY=; b=fyrA8AZtCA1YMLmxx0wmWST53/R8ZoNihEYUY48LPgoQyMyF7QmlnDSCrUOgB9NkNM p29e59t2FBCcVQ4H/0B6EvNu/DRylxSIjkhxDq+Ch/TV+cnbDn926CsF//PLw1MyfmSt L5UM906cvlxdofHPH6vXuqsK88JZlm5pvbV2NDmY4Vs/X5wTYbmkToAiAfmEHbX6SxSR 60c8bxcr1wj/Kvv1vBWMOhpMNuxgJv++v+p3naclGe5W40k+M/SiiLwubYvm0TmZOM9L iZ3nyA4zo+hrAg6L9SKPtGxmN3nlitkijhw/Hoinp8qbASf3P+Ll/k346wj5lXJaxCfc PHog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=Zm+yxaXC4j0bflQxITvcr56h79k4qfhTXv48uDydZoY=; b=Z6gRzusg5DQl3XO9WzuL7x8E67vDPRQqw8AXWVLA8Ft/zKUL5vGMeaohfUXQEmVppq PUisNq7cCq9OidwyerpXotRe0uvy9j7SgTuincWvvZAE3PQeBaXkhGvqvrjgkT8Gsqk2 ur056X8ipvrDFVf4MGPpjbFZ6JJwjyewb5e9cvkycDs9GH4Orxuo+k8EtJDa0HYbRLev sSzNEfNwQo8vb2KYJMo5UBaXUN02v8oPXFFj5nhRl5JdTrR+OFBWB5yscRVeiKxHcCEa 59hTTDEY7yDYhM3mzq+9eq/aJNnSRkX9QA7K/0NY9YJjBPC79OsTGtsQo1GtHZnuy1ca HhYQ== X-Gm-Message-State: APjAAAXpW4xocQSVOKQ8xrwn3Idjn6w9cjFNxE+OBFNJZwLo2uzBvEew DbcJdBc5KZ49qgWl/LnI2q8jnPVIIRw= X-Google-Smtp-Source: APXvYqy70LeyhVODEbO1D9srx4x27X0f0mzIbE63AF7S4MOTP+cSwOa1OjDrUTVBednxvjfkF1pv3Q== X-Received: by 2002:a62:70c9:: with SMTP id l192mr5978002pfc.207.1551858359062; Tue, 05 Mar 2019 23:45:59 -0800 (PST) Received: from [192.168.1.71] (d207-6-152-227.bchsia.telus.net. [207.6.152.227]) by smtp.gmail.com with ESMTPSA id h13sm1813930pfn.114.2019.03.05.23.45.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 23:45:58 -0800 (PST) From: Rob Sargent Content-Type: multipart/alternative; boundary="Apple-Mail=_4A4005F8-2305-448C-9F98-8D85C713C645" Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: query has no destination for result data Message-Id: Date: Tue, 5 Mar 2019 23:45:50 -0800 To: "pgsql-generallists.postgresql.org" X-Mailer: Apple Mail (2.3445.102.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_4A4005F8-2305-448C-9F98-8D85C713C645 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I=E2=80=99m using 10.7. Does an empty result set generate this error by = any chance.=20 One of my plpgsql functions is now throwing this error: select * from genome_threshold_mono('11-O3C.pbs','1-O3C_chr',1.96, = 1000000); NOTICE: group id is 5eed8d65-d39a-4f72-97a3-ca391b84880d NOTICE: New threshold: 66128154-d128-4e66-bb8e-e9c9ee5ae89d NOTICE: doing chrom 11 NOTICE: 2019-03-06 00:21:17.253375-07: markerset id is = 9a8f7487-bd64-4d43-9adf-5ae1c6744e60(1-O3C_chr11.Loci.ld), people = (5eed8d65-d39a-4f72-97a3-ca391b84880d) id is 11-O3C.pbs NOTICE: table "collected" does not exist, skipping NOTICE: table "mrkidx" does not exist, skipping NOTICE: 2019-03-06 00:21:17.295142-07: working with 28607 markers NOTICE: 2019-03-06 00:21:17.383835-07: added 3514 segments to = imputed_pvalue_t ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM = instead. CONTEXT: PL/pgSQL function optimal_pvalue_mono(text,text,integer,double = precision,integer) line 65 at SQL statement SQL statement "insert into goptset select * from optimal_pvalue_mono(people_name, mvec.name, = mvec.chrom, conf, maxi)" PL/pgSQL function genome_pvalue_mono(text,text,double precision,integer) = line 19 at SQL statement SQL statement "insert into threshold_segment(id,threshold_id, = segment_id, smooth_pvalue) select uuid_generate_v4(), tid, f.segment_id, f.pval from genome_pvalue_mono(pbs_name, markers_rx, conf, maxi) as f" PL/pgSQL function genome_threshold_mono(text,text,double = precision,integer) line 30 at SQL statement The code referenced at line 65 is the last line in a "for row in = query=E2=80=9D construct as follows: 54 for segp in 55 select s.id, s.firstmarker, s.lastmarker,=20 56 v.ipv, 57 array_length(p.probands,1) as pbs, 58 s.lastmarker - s.firstmarker as mks 59 from segment s=20 60 join imputed_pvalue_t v on s.id =3D v.segment_id 61 join probandset p on s.probandset_id =3D p.id 62 join probandset_group_member m on p.id =3D m.member_id 63 where s.markerset_id =3D mkset 64 and m.group_id =3D pbsgid 65 order by ipv, pbs, mks 66 LOOP Plugging in the appropriate values for an example run generates a proper = dataset (~1300 rows)as far as I can tell. =20 This construct had been working until recent changes but I cannot relate = the message to any deformity in the current schema or code. Any pointers appreciated. --Apple-Mail=_4A4005F8-2305-448C-9F98-8D85C713C645 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
I=E2=80=99m using 10.7. Does an empty result set generate = this error by any chance. 

One of my plpgsql functions is now throwing this = error:
select * from = genome_threshold_mono('11-O3C.pbs','1-O3C_chr',1.96, 1000000);
NOTICE:  group id is = 5eed8d65-d39a-4f72-97a3-ca391b84880d
NOTICE: =  New threshold: 66128154-d128-4e66-bb8e-e9c9ee5ae89d
NOTICE:  doing chrom 11
NOTICE: =  2019-03-06 00:21:17.253375-07: markerset id is = 9a8f7487-bd64-4d43-9adf-5ae1c6744e60(1-O3C_chr11.Loci.ld), people = (5eed8d65-d39a-4f72-97a3-ca391b84880d) id is 11-O3C.pbs
NOTICE:  table "collected" does not exist, = skipping
NOTICE:  table "mrkidx" does not = exist, skipping
NOTICE:  2019-03-06 = 00:21:17.295142-07: working with 28607 markers
NOTICE:  2019-03-06 00:21:17.383835-07: added 3514 = segments to imputed_pvalue_t
ERROR:  query has = no destination for result data
HINT:  If you = want to discard the results of a SELECT, use PERFORM instead.
CONTEXT:  PL/pgSQL function = optimal_pvalue_mono(text,text,integer,double precision,integer) line 65 = at SQL statement
SQL statement "insert into = goptset
        select * from = optimal_pvalue_mono(people_name, mvec.name, mvec.chrom, conf, = maxi)"
PL/pgSQL function = genome_pvalue_mono(text,text,double precision,integer) line 19 at SQL = statement
SQL statement "insert into = threshold_segment(id,threshold_id, segment_id, smooth_pvalue)
         select uuid_generate_v4(), = tid, f.segment_id, f.pval
      =    from genome_pvalue_mono(pbs_name, markers_rx, conf, maxi) = as f"
PL/pgSQL function = genome_threshold_mono(text,text,double precision,integer) line 30 at SQL = statement

The = code referenced at line 65 is the last line in a "for row in query=E2=80=9D= construct as follows:
    54  for segp in
    55    select s.id, s.firstmarker, = s.lastmarker, 
    56   =         v.ipv,
    = 57 =           array_length(p.probands,1) as = pbs,
    58         =   s.lastmarker - s.firstmarker as mks
  =   59 =    from segment s 
  =   60 =         join imputed_pvalue_t v on s.id =3D v.segment_id
    61         join = probandset p on s.probandset_id =3D p.id
    62   =       join probandset_group_member m on p.id =3D m.member_id
    63    where = s.markerset_id =3D mkset
    64   =        and m.group_id =3D pbsgid
    65    order by ipv, pbs, = mks
    66 =  LOOP
Plugging in the appropriate values = for an example run generates a proper dataset (~1300 rows)as far as I = can tell.  
This construct had been = working until recent changes but I cannot relate the message to any = deformity in the current schema or code.
Any = pointers appreciated.

= --Apple-Mail=_4A4005F8-2305-448C-9F98-8D85C713C645--