Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fYpMG-0002qe-A7 for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Jun 2018 09:06:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fYpME-0001YQ-9j for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Jun 2018 09:06:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fYpMD-0001YJ-V8 for pgsql-hackers@lists.postgresql.org; Fri, 29 Jun 2018 09:06:22 +0000 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fYpM9-0008M0-Up for pgsql-hackers@postgresql.org; Fri, 29 Jun 2018 09:06:21 +0000 Received: by mail-qk0-x242.google.com with SMTP id c198-v6so4526546qkg.12 for ; Fri, 29 Jun 2018 02:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pcorp-us.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=uuSif8SM2jGkwyntT0448J87BxKpZOj7a8qIlUWVQhk=; b=11daDTwie7ynhHGYEnWNaL+76fDXaKFRDCk0YKZRVN2l9G6VdyL9ovrCBRtH0M09pQ HxZGTINdP5UJuW3VdP+Etw6puiJmB9WSJcQwB+VWfRWFrxLseiwEIZKiweuO9GrvrFzP MBVQJ8SwweVkLRjmKi1YSRBnL3ZMmzmBkA8C1TVmJIn/mHFhiEshhhKc2pfT8wI4m+0V jPHEHF3grexu0Lmk4v2FJAfoEHEWJXcZCY2c4AvTGMUJunuj6EpbuequB7hlDjeUVVSo Bx5uB9fYVmTvI2GBrhYt3mkG/PmZmRgk93cebbTIwM7soYS1SGN4+VhXePvey37AWtl0 eeFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=uuSif8SM2jGkwyntT0448J87BxKpZOj7a8qIlUWVQhk=; b=qD2hRbmpVDn+ugNLIrgtsnQaZjpdLGvckIeGNyOolfWyA/Jc0qSYSgGk06EDN7CD20 Wk5C87nlESPXrAbfjzzD+ozmFUO8GkJ2+SE/OA8GGer/1PTQmQ5vamXEtozaSAv1wUeV twNoua6oW4/52/LXXPeAzIQbT1azEhntR/kbaM701Xujq3eeWvrjkHW/sA/n9XZYsFP2 r5l2UgFJ2bUOsddk6Bbln1GdEhfL6YDNynyuqnfG/ab4Pp3JhIpmP+IFM9ev/sN16u0a mOS3TtDnjEG2yuIh9cUdbX0soJFHjwBQ7lJU1/BxZx+mfhHYdO1adk/cNVqAFbGDBA0/ yoVw== X-Gm-Message-State: APt69E0lCLwWWBGVSve0KMAAsNwODivjxs3fJiMGn/n3H3+3qSATFANm MUKx+xTaTqQVad7mvufWa8mcH9E6 X-Google-Smtp-Source: AAOMgpdcUkOL2yyh05Dzn/UhHt/XbPRhK6nkZF9qw4iMHx+gHEWTjro/gAteOgrUJHFwBY4YtC8VnQ== X-Received: by 2002:a37:5a43:: with SMTP id o64-v6mr12272265qkb.211.1530263175463; Fri, 29 Jun 2018 02:06:15 -0700 (PDT) Received: from R (50-78-240-110-static.hfc.comcastbusiness.net. [50.78.240.110]) by smtp.gmail.com with ESMTPSA id r27-v6sm4264665qkr.17.2018.06.29.02.06.14 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jun 2018 02:06:14 -0700 (PDT) From: "Regina Obe" To: Subject: Regression on PostgreSQL 10 ORDER/GROUP BY expression not found in targetlist Date: Fri, 29 Jun 2018 05:06:24 -0400 Message-ID: <001501d40f88$75186950$5f493bf0$@pcorp.us> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdQPiG0YCUZc+bSqSEunbTWQi1t1iA== Content-Language: en-us List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On June 26th, our PostGIS debian bot started failing on PostgreSQL 10 with one of our regression tests for topology. It started erroring out with ORDER/GROUP BY expression not found in targetlist Related ticket here: https://trac.osgeo.org/postgis/ticket/4111 I think the exact query that is triggering it is this one though I don't have PostgreSQL 10 head installed locally to confirm. SELECT 't3280', 'L1b' || topology.TopoGeo_AddLinestring('bug3280', geom) FROM bug3280.edge where edge_id = 1 ORDER BY 1; This bot follows the dev, and stable git branches of PostgreSQL, and it was on PostgreSQL 10 that it started failing. PostgreSQL 11 was okay. I'm assuming this is an unintended consequence of this commit https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=3566873f2 1909397561418fab22c98332fa8b72a as that's when the issue started happening. Just want to confirm that and not something in our code we've just been doing incorrectly. If needed I'll try to put together an example that doesn't involve PostGIS to exercise the problem. -- more details from the commit and it seemed like lots of files were changed Add PGTYPESchar_free() to avoid cross-module problems on Windows. (details) Commit 3566873f21909397561418fab22c98332fa8b72a by tmunro https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=3566873f2 1909397561418fab22c98332fa8b72a Add PGTYPESchar_free() to avoid cross-module problems on Windows. On Windows, it is sometimes important for corresponding malloc() and free() calls to be made from the same DLL, since some build options can result in multiple allocators being active at the same time. For that reason we already provided PQfreemem(). This commit adds a similar function for freeing string results allocated by the pgtypes library. Author: Takayuki Tsunakawa Reviewed-by: Kyotaro Horiguchi Discussion: https://postgr.es/m/0A3221C70F24FB45833433255569204D1F8AD5D6%40G01JPEXMBYT05 Thanks, Regina