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 1h1YH4-0000JU-5o for pgsql-general@arkaria.postgresql.org; Wed, 06 Mar 2019 15:16: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 1h1YH3-0003hB-1k for pgsql-general@arkaria.postgresql.org; Wed, 06 Mar 2019 15:16:01 +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 1h1YH1-0003f2-7O for pgsql-general@lists.postgresql.org; Wed, 06 Mar 2019 15:16:00 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1YGx-00059F-Oh for pgsql-general@lists.postgresql.org; Wed, 06 Mar 2019 15:15:58 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D57BD2175C; Wed, 6 Mar 2019 10:15:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 06 Mar 2019 10:15:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=s YKDZxJAxCaxJ/HnFTq/jidcG9iar0oGPJ7uLT2WZP0=; b=xPEvqWUi2+KRvjFSc NRoMqwI/IHRXT5hsRYqLCSkrGAjWIz7wV3M/IyM3YZ7f21sqGGRcVh67mt4+APJT yhh6J2XOJIfHlhgjv/+J/MVRoOVFcBGLNQVqjCjGRi5JsSSU9KC3ToqZV44fE3+h RJEwSjbCsGE3j3y7EZL9JGq2JF0SrkjsdOlNm4oRwD3UqIA4FbL/FU+31sO59DJU POqOImAWorCj+dIEiyOClzfsVROSA7jcRGYgQgv1F34FWcVKl6hQNzydSDbvEDGv +D88Sf4r80cU6PIQ4wXj+KNR61JSSg7JxL5MVRMR+Wam0njTdNGDwA+8vEkGeix7 1ojrw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=sYKDZxJAxCaxJ/HnFTq/jidcG9iar0oGPJ7uLT2WZ P0=; b=H327NnYdEbTh7y+keeGWxCO2bG0c0rEflLsnKrR28RFTMe0nKAg/VWU3W X1KRX6I9f1kUVJdUo1cMKQCjTQov2hpi4WgyW0SiQDxL760l2Jh3IqbMFanubzxb ZenYfUuUj5aMbFqvfM9mi/jN93UVBe8L8nJJVdm7jNCO/qOWjYCmKyEY0kpz1TQf GuUSRex5wIbwp0fXsrSGpdwLEMb97Y0c87Q5bsays88I1GRttPulJkWguXyaqMt/ uDzjERwNNIWljzk1kjaNVq0Zp1HljDQGfL9RqcZMO5TsiH7Z+Io9mGnFSUe0lPDb P6a2tD+3lvj6QHeZQiCuOYUJsNW7g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrfeeigddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefuvfhfhffkffgfgggjtgfg sehtkeertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirg hnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuffhomhgrihhnpehsrdhiugdp phdrihgunecukfhppeejuddrvdduvddrudehtddrvddtvdenucfrrghrrghmpehmrghilh hfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 86A2A10312; Wed, 6 Mar 2019 10:15:53 -0500 (EST) Subject: Re: query has no destination for result data To: Rob Sargent , "pgsql-generallists.postgresql.org" References: From: Adrian Klaver Message-ID: Date: Wed, 6 Mar 2019 07:15:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/5/19 11:45 PM, Rob Sargent wrote: > I’m 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); The above is the function you started with. See below for more. > 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. Below you have two other functions in play: optimal_pvalue_mono() genome_threshold_mono() If I am following correctly it is line 30 in genome_threshold_mono() you want to take a look at. > 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” > 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 = > v.segment_id >     61        join probandset p on s.probandset_id = p.id >     62        join probandset_group_member m on p.id > = m.member_id >     63   where s.markerset_id = mkset >     64         and m.group_id = 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. > -- Adrian Klaver adrian.klaver@aklaver.com