Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxLWc-0004f0-8C for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Jun 2021 03:32:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lxLWY-0006jn-RJ for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Jun 2021 03:31:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxLWY-0006jf-HI for pgsql-hackers@lists.postgresql.org; Sun, 27 Jun 2021 03:31:58 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lxLWV-0005Ud-EY for pgsql-hackers@lists.postgresql.org; Sun, 27 Jun 2021 03:31:58 +0000 Received: by mail-pg1-x529.google.com with SMTP id y14so12129871pgs.12 for ; Sat, 26 Jun 2021 20:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=voRHOARth3axiJBkExQVx4PmyJA3skR/LcM2XQpWZ5I=; b=MqKc67jLXPM44hcX8v+Ewv8tQWvKZdRVFpS+72U5nWM0QlNgNMA4YEB3Uot3AbD2Y4 XyJ8N+FNxmio44lCYB2IyTkX8o6lBZ+XbylokM+jlY/4nGveFrEobeZkJHlzRH98XBAb qyo2sze9GieAuU/0I44YfmT+kN5m7LO2lnjs775V9Ep3/AuISiyLN8sfqV0WvMRJGDXw qvV7ifQuzhEhOj9STy2/EE+d6729LNS2tkqllFnkgTOs4a2mJt6LR5tJRAHsi7oE2F7l RZ9+DtNa4+Up5U+fQdPXnkzVDBb8yCp4TwvthWtHh6ouHbykdv+oiGK0Bn+5xLJkJO/o qZww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=voRHOARth3axiJBkExQVx4PmyJA3skR/LcM2XQpWZ5I=; b=jMNrhCGjr/SytiVdTAfCisfqvSZXS0vAxM0lW9XuF/YAl44q8atIVfWV/K0DiRe1XF kdg8Hl/QdyGHGbYipEprm7z2x98GRUBLyaH7TwRtCnYbBEgd2J3ekdE0HaINNJrew52X YFU6TKgHMYnO7Sw1NruDVi71lVp+pLD8/WWcgZJbpX1BES+CyHKaVxA0+JmbY8kxIgVc O/+bw9Ce458IfBs6I5LNitOzqToFK4gcOh8sBL3JIrigELpHGFll3RzKTVU8GbI8nsxQ +6fTcSb0ivJ+ouWjccc/0YnqlasIBYo7J1qd/bgEEXdsxZKUEwKxldvU/lfveb8SSogP nN1g== X-Gm-Message-State: AOAM5308iArx9mCKusHvhshkHSvzIix1Z+IkwhSOJ6rCAdNPV3UZcUhy E259nCt+W2/E755Y3P68pmyPVw+XJsQ= X-Google-Smtp-Source: ABdhPJwjGbzHajBrrKYIs06uNgj3GfuZ3g5gp2dDkFoNfjDdlaVugagQjDfwZW/7IyopzDFGCmkF8w== X-Received: by 2002:a63:cc03:: with SMTP id x3mr17002679pgf.133.1624764712533; Sat, 26 Jun 2021 20:31:52 -0700 (PDT) Received: from nol (2001-b011-0001-721f-1649-3133-8a3e-8398.dynamic-ip6.hinet.net. [2001:b011:1:721f:1649:3133:8a3e:8398]) by smtp.gmail.com with ESMTPSA id m4sm14994454pjv.41.2021.06.26.20.31.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Jun 2021 20:31:51 -0700 (PDT) Date: Sun, 27 Jun 2021 11:31:53 +0800 From: Julien Rouhaud To: pgsql-hackers@lists.postgresql.org Subject: Re: [HACKERS] Preserving param location Message-ID: <20210627033153.4orlkah2grcnslgi@nol> References: <20170311220932.GJ15188@nol.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170311220932.GJ15188@nol.local> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Mar 11, 2017 at 11:09:32PM +0100, Julien Rouhaud wrote: > > When a query contains parameters, the original param node contains the token > location. However, this information is lost when the Const node is generated, > this one will only contain position -1 (unknown). > > FWIW, we do have a use case for this (custom extension that tracks quals > statistics, which among other thing is used to regenerate query string from a > pgss normalized query, thus needing the original param location). rebased v2.