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 1lyzMe-0005f3-W8 for pgsql-general@arkaria.postgresql.org; Thu, 01 Jul 2021 16:16:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lyzMd-00080t-Uc for pgsql-general@arkaria.postgresql.org; Thu, 01 Jul 2021 16:16:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyzMd-00080l-Jx for pgsql-general@lists.postgresql.org; Thu, 01 Jul 2021 16:16:31 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lyzMb-0004oK-8f for pgsql-general@lists.postgresql.org; Thu, 01 Jul 2021 16:16:30 +0000 Received: by mail-ot1-x329.google.com with SMTP id m6-20020a9d1d060000b029044e2d8e855eso7036782otm.8 for ; Thu, 01 Jul 2021 09:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=L86xufD8vcqa2Aww7+yIduCsIBecLe3M8loXuBBRk0U=; b=O8jttFjtKf2VR8WouE4x/D6nYwPsiimwgjyq5ciBC+WznZi09tZgNUY/06iR7nv8o8 Ws+9hGmWo6UuZ39teNPxfc/tlCgD1n91LbYDrjZ/WshHvOIWOfaOQvW0XDbQEsODm2Md Jeg5S86b6gupp60VqNeFxW+ZJALrQLRSpgjkLilyEDbc8/CYIs5UxNXgTiRT2KnWcefv EidPBPN9vVAf1qmlX9GNQspw/VgUERKWRiZ1rrSe1w+pBQi/SLSkWZpPUCy617Cok7XR dzXlO+XXVEjrmuURZpZ196IM/vBAjrAjAl8Vxw/8nc3o1RgO8CT2oY2miZadz5+/2Kda HMFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=L86xufD8vcqa2Aww7+yIduCsIBecLe3M8loXuBBRk0U=; b=YzzEBMGn24zOSUvi+OC8nWWEGLHTl8n7LGgou3JcJGLVhbHBt++glA9ZLUk/hQTdOk T0FWa39q4wn6Dq2DfU5V+UO+oMC7SDG83bu+6PABC+tkZaS9OYUDJ4+UVIvGHFZn9tVh TFiFZ9gr53l/U3VvPKgAaq+6LRA2XbUtgXieNFMrQ4hoRzuU0vsBbtssyFewNXYBgOEy GxXkmlzAbnEM+Ojb2knSyxiVB0WYYYTMnUNQeGV19o9Ry7MP/MI8BIYNQc2f1qeC/M9R /7QFieHi+rGPxhTUxC/4/+/yIvALwdzSqUJl6c/C/Wsgw5gZ9gzs63v4Th1Y1hSHZ9zS wbLQ== X-Gm-Message-State: AOAM5318gLKHn0b3eSTKXQ1atDRbEcfQAB8EL9fkkWZYu4Rx3HfzM4pw i+deuuxWhyv3XDoRknLKrIze2Fsw0xZXKQ== X-Google-Smtp-Source: ABdhPJzGq6WyGQXkCQTmfQFZoVLoMlY7DLZKN+ecOPe/BFCz+b+eRI9UuvGplK5809ZwVFPkXiBcdQ== X-Received: by 2002:a05:6830:1e52:: with SMTP id e18mr642006otj.135.1625156187752; Thu, 01 Jul 2021 09:16:27 -0700 (PDT) Received: from [192.168.88.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id w2sm80949oia.34.2021.07.01.09.16.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Jul 2021 09:16:26 -0700 (PDT) To: pgsql-general@lists.postgresql.org From: Ron Subject: EXPLAIN with anonymous DO block? Message-ID: Date: Thu, 1 Jul 2021 11:16:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Postgresql 12.5 There's a query inside a DO block which -- because it's parameterized -- I'd rather analyze while it's in the FOR loop of a DO block, instead of pulling it out and hard-coding the parameters. Is this possible?  If so, where do I put the EXPLAIN statement? -- Angular momentum makes the world go 'round.