Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wZbjZ-001AMz-2u for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jun 2026 21:54:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wZbjY-0033I2-0Z for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jun 2026 21:54:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wZbjX-0033Ht-2r for pgsql-hackers@lists.postgresql.org; Tue, 16 Jun 2026 21:54:11 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wZbjW-00000000hy5-2MyB for pgsql-hackers@postgresql.org; Tue, 16 Jun 2026 21:54:11 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-bec2ddee9bbso1016550566b.3 for ; Tue, 16 Jun 2026 14:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781646849; cv=none; d=google.com; s=arc-20240605; b=DJwRfnhn0drfkjItj+jqMNpG531vcJOVfWkg7RCrJjYTmijLP4Qmq2jL0D1BXAn1Mc tm4O6BYsjlI0h3ZEdkEbBzlmtqpM5ChloV2gk+5G/QZYAHjCEktiz3u3Lqm15ItP6CR1 FAwMMhDWcsZAOCHOEDRMalhh6DKQD7BfAgTd3+vCPAnj4yxYkTR3jhPJsX4TB0ERWq4N o4z4fxSnHbECa+aUAWKxPxoFcHyxRKueWMgKBnl38vDZ2hk6aIgg5lg+OPblln1syBLt GZbjTX5PHqD4vgIDhl7AtVxZkRFcFVqyUDhgUTISHIoEwVP4NbTT+lBGKuVaUuVeaOZA JAMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c/F8JGlCMfBW8zwi1oNZN3h3NwsevGrbg+aJMYqVdKQ=; fh=NL4QyMwv0DCVmC68ww6HINyo28r9eaplXTJhPnAk2qQ=; b=TWJb5SvOMwSxiPB/KbsoZHzEPhsBuxlWGdV9CCx2GpvV1gqBwNQV6DrAidlA8SXoaB 5d1rnmFBP2KR0pYGU2EOl0b6sAN/Ku0R333GKPFc1O0rcidJCjao+4HHj3j2/ooVdHV6 uPSFPq5sV+7JrBgykiZ5bS+7ifsH1blzj1s3GxRJlqMEaxjibN5o5aK4tGeuBlP3qNbb j1BFX5JtUD1MJHmYBF0MFvFnQvHZgfSWo1XV2N9XTKlObDfpOAhhrVDN3bZ0H1LwTOrt JqFKhmNEVwguLRDyf408+QRxY6n9DGjlOVHWRSgD8o33UjG+w8Nu0lJuZ+Ze/BQEu0tJ gjvQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781646849; x=1782251649; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=c/F8JGlCMfBW8zwi1oNZN3h3NwsevGrbg+aJMYqVdKQ=; b=ED9gnykdHzhhcFrYWKTkPP11rMV19A/DKaDG3qiEqxWiYJQbFVdka/IjLffHbAnfnY hUpE2+wuWnFfdbIOtwU82kPxDGEHkjzDtD9JG35EsUQ8+EZcS5rmZxzRBPOR+LL9fk+W FrYj9/gm4vmkq6+n+QO9Y29ONqNBxsrxQqgTOlZ1BkFEpzX8hU2biNNU3IXYU2LbJKBm dENOkMD2ZoQ5OlRjgpei15+3cP5v2AZ7dA+h2X4uxd6lhvws9g7asQfqtG9nPBaKssdY xJXeoBfAVDrJodNipO3Dp8BSwndkJlgw5jptjG6iNCjf5dkiLBg1M/VlHxwgcimeMXvQ QYiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781646849; x=1782251649; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=c/F8JGlCMfBW8zwi1oNZN3h3NwsevGrbg+aJMYqVdKQ=; b=A0ol26VIsKttXcsgZ4SK2m45Vf0RYEo9si0UhXVAbFBIJI9Zwp3Yy+k4VUSmTnUn8p XkwyXpslpx0aBqH8pPXDii5jeJLlQ9PW/3pFRahsFhzRtf02L0U5r5BNhnZzmfyy83RN oMefKk6zHx8E7yMAMRSr1tZbXRdoN0rP0lZM21qoCKIYUlp4OkjOegHK85IQ6zLzz14l i/odFPuCQNe4dutbVfFzvnveJIkDEWsdh3THNxxyvdXIx5KozrHno9PzYFWNDQs8smIB tz6MBSxgl7s4JwLZRU//fMPZVR4NzpmR2CjwyRjzPExHte7/m7m6HHAKISy/agJUr64m QiEA== X-Forwarded-Encrypted: i=1; AFNElJ/h9rdaWpzItFmQxWAVE7TNaFaG4z0XJMHNzFyIZFSuakFw53Cta/xeZUy2cDRezu6mq5d3jp/uPZGsEyxj@postgresql.org X-Gm-Message-State: AOJu0YytZMLiikjDGrXVYkZJMIj3jAjwNUxRvCygYgYZTEpw937+AdRC dQNY/5sMHdafafV8gSWw8P+t6A1E/OFHfhnimH6XDhkbgjOZCw+P8pjlex+Wq8ACYY11tXrn2SC Vlwz3w/o4gxNZJY44sNcNrXZCngRd4Lk= X-Gm-Gg: Acq92OHZtrdr9aau410R6Mcl05UuKfxJmFGICUSI6VicndXY0P95t279sGpWJveyRFJ 0kW601FBa7sVFOMEq4CeLpX+dDggv2db2e5KoKqL8Rs0GrwRT85NnAMYdgjhw8iFBx0EQ2v+aKp DNwRkvMXB+32LbaQl4ZkyxrRgvkDQinLKY0bV5JXZoc7Nct1WA5CnDJvtDC7IzFpnEY+qg8sWTE c5K1g4MzS45OJE91w6/T0rU5mOAfZthA5W2ba/tKYYHtHDGzJouZomG0+naUqFYASZ9Z2QmnVPl g3pciITVHKQ62UC4DgzAnR0wPnta2VAz5yXiMPU= X-Received: by 2002:a17:906:5a52:b0:bfa:200b:7a4c with SMTP id a640c23a62f3a-c05d1f42161mr31556666b.5.1781646848404; Tue, 16 Jun 2026 14:54:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Tue, 16 Jun 2026 17:53:55 -0400 X-Gm-Features: AVVi8Cef7B1pJjW5KVJLTS8d5JVDaEBlUcepxVX7CIhA1NhVtToBUyCqZ-CMBPk Message-ID: Subject: Re: use of SPI by postgresImportForeignStatistics To: Corey Huinker Cc: Etsuro Fujita , "pgsql-hackers@postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jun 16, 2026 at 3:11=E2=80=AFPM Corey Huinker wrote: > Obviously, even that wouldn't get us to the no-FunctionCallInfo-at-all go= al, but it would get us out of the SPI situation. If we did have a non-fcin= fo function API, that API would either have to pass char *params almost exc= lusively, or else each caller would have to do the translation or float-arr= ay strings to double[] and such, which would be a lot of work for the calle= r. > > Would you be ok with a function like attribute_statistics_update, but pur= ely with cstring args? Obviously the callers would have to modify their cal= ls each time a new stat param is added, but that is seemingly preferable fo= r you than the current situation. I feel pretty strongly that we want a way to identify the relation by OID rather than by schema and name. I'm not sure whether attributes should be identified by name or by number in this context. Apart from those things, if passing strings and leaving it up to the called function to interpret them makes most sense, that's OK with me. I agree with you that getting rid of SPI is a much higher priority than getting rid of the FunctionCallInfo stuff altogether. I could live with DirectFunctionCall if we don't have a better option. I'm a bit suspicious that this will lead to code bloat in postgres_fdw or elsewhere, but maybe not. --=20 Robert Haas EDB: http://www.enterprisedb.com