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 1h1YS5-0000uf-Th for pgsql-general@arkaria.postgresql.org; Wed, 06 Mar 2019 15:27:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h1YS4-0000Hx-K2 for pgsql-general@arkaria.postgresql.org; Wed, 06 Mar 2019 15:27:24 +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 1h1YS4-0000Hp-8E for pgsql-general@lists.postgresql.org; Wed, 06 Mar 2019 15:27:24 +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 1h1YRx-0005O2-9c for pgsql-general@lists.postgresql.org; Wed, 06 Mar 2019 15:27:23 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7DDE420DD4; Wed, 6 Mar 2019 10:27:16 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 06 Mar 2019 10:27:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=7 6GuF6pvQeTDrl1OkQRQM73c+F0tbx/pkZh00KpVu8o=; b=r1KslaNpNtq9uuTU3 3rpFRiqNV5vm3sBId1rE/8SnlulifkfqYVGYj3a9tPE8+9S2sSp8CmK5jLsk5aqs J8wPb0bXY1VTp0ZkQwFqmbr72te9DZrjDJR8oqd0IFOK8KIephjs9irqS2W41xeB Yw3GaCkbTKUetgbxZAof7KI7WvXtOBQed2UwWQnYH5N3K3ONOgy5V4ByX/sLK0y6 sESJYGeSB2wlZwwQnaWvn684Xill332KX3OgZLCHZZ5qVzAuffEE7Wz13jhM8cjr 2BKqkl63MKvHkEzG4+kyNByOA+mfuO+XP6gdT4CORdAMCy61NPQvEF8n9Apxhd/Q 3asjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=76GuF6pvQeTDrl1OkQRQM73c+F0tbx/pkZh00KpVu 8o=; b=K+lSTsjMKx9OpXsnzLlKCFjCNNij2y5DfQl7uGyM2l+2uhR/xte1D6RHo if/6EYu4Xj9gvZFRMEvXIZjMPY84758n+aO7u+MBJFyh+ZS8f2Xy36YVhVuwNQNI +g3AvbI5+vdxzyT3WpuLCnWrDCp4/RBNgWrM7LofAMXIdp6LtXbCuVT+tlcj2d6V JTGQ5ZF++4ipKQMWB08XuDI3RbApK8ThtYMp22/ZN62vtP1hCnzvdMSW+i1SJHB9 btQreaPgLNVgtYLZzwcLbPRDX1r5RlG0zIp7Zjno1QADDkuDb2vYVrltWLPFoQd6 diT+hYSVO1B3nBAphDr3Q7u2KzobA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrfeeigdduhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepjedurddvuddv rdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrg hvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 71D52100E5; Wed, 6 Mar 2019 10:27:15 -0500 (EST) Subject: Re: query has no destination for result data To: Rob Sargent , Ron Cc: pgsql-general@lists.postgresql.org References: <56fdbfbb-c0ed-3aa0-3815-eef3545e5419@gmail.com> From: Adrian Klaver Message-ID: Date: Wed, 6 Mar 2019 07:27:14 -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/6/19 7:12 AM, Rob Sargent wrote: > > >> On Mar 6, 2019, at 6:32 AM, Ron wrote: >> >> On 3/6/19 1:45 AM, Rob Sargent wrote: >> [snip] >>> 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. >> >> What were the recent changes? >> >> -- >> Angular momentum makes the world go 'round. >> > > diff optimalMonoPed.sql optimalMonoPed.sql.~20359ea9e67ddf009db89b94140f67988862f247~ > 13,14d12 > < imkr int; > < jmkr int; > 53c51 > < -- > --- >> -- > 67,68d64 > < select imkr=min(ordinal), jmkr=max(ordinal) from mrkidx where ordinal between segp.firstmarker and segp.lastmarker; > < raise notice 'seg % start=% i=% end=% j=%', segp.id, segp.firstmarker, imkr, segp.lastmarker, jmkr; > > In other words two variables dropped along with the select which set them for their only use in a NOTICE, plus white space on a comment line. > > So yes the problem must be in the caller. > > A not on line numbers: Using \ef on this function presents a slight variation of my code: it rearranges the “language plpgsql” from after the final END; (old style I guess) to before the AS. So line 65 is actually what I thought was line 64. I believe language plpgsql is not considered part of the function body so it is not included in the line count: https://www.postgresql.org/docs/10/plpgsql-structure.html When tracking a line number down I usually do: \ef some_function line_number which counts the line in the function body not the file. So for example: Using set nu in Vi: 1 CREATE OR REPLACE FUNCTION public.ts_update() 2 RETURNS trigger 3 LANGUAGE plpgsql 4 AS $function$ 5 BEGIN 6 NEW.ts_update := timeofday(); 7 RETURN NEW; 8 END; 9 $function$ \ef ts_update 4 CREATE OR REPLACE FUNCTION public.ts_update() RETURNS trigger LANGUAGE plpgsql AS $function$ BEGIN NEW.ts_update := timeofday(); RETURN NEW; <--- This row is marked END; $function$ > Still not the real problem of course. (I’ll update my ways re: coding functions) > > > -- Adrian Klaver adrian.klaver@aklaver.com