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 1waaNm-001uPW-0w for pgsql-general@arkaria.postgresql.org; Fri, 19 Jun 2026 14:39:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1waaMj-00GdYk-38 for pgsql-general@arkaria.postgresql.org; Fri, 19 Jun 2026 14:38:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1waaMj-00GdYc-1k for pgsql-general@lists.postgresql.org; Fri, 19 Jun 2026 14:38:41 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1waaMg-00000001HZr-42e1 for pgsql-general@postgresql.org; Fri, 19 Jun 2026 14:38:41 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-6976c463db0so235461a12.1 for ; Fri, 19 Jun 2026 07:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781879917; cv=none; d=google.com; s=arc-20240605; b=RtXUtGlLGzoLshn4qaWIpC7cL8cOiVT4OTi9Q0YTVlR17l6pQqtKMguMglypYOaH15 Rd5NKRD3J0OY8Fx7DSL+5yeFmyV3yP6ppRip/KZ17QPOAO9OYc/R4s3vFmJ59FW7sKLF LJcrYyEqE0B7RlVgoGDUDbcaz1hlLPCYicGcsp946s2H8Qr61gNplwwnlI1Ox7UikA3u PziIazHMODRMP9V7KhdS5cfhVWBamnDu07o4P/bWKXoDFoGKiTdnQAsbOatuk+lRLEt7 ojYKg4ymzypIkZ2gY1HOliaE5Ke3dIs3534NCdyY47KaRIfrEngvmRNFq6iQwBcIdklr yMJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=BnYwoUbk5lRv8jEgq+XXBd4eRT2Eqs4AZHW06CNgn8U=; fh=uwN73B5ZAAaDenIz7kFktBcCMtfQ/1rRDC2gVZ204XE=; b=UNC3hP+81gLmoS3TrAashdjT42F3MwthomwmXsRqB5heqxkcg+Z/UgMUA7uCKe0PgX GkxSrEtl/8skOzEYPmqdvHk48OxfuegVsBvBsZ+DiKUbtI6SOmiIGuH0cGz9HRr86CwC +HWEKcGyDao/ikZbTVqA8uEfFPIvd1F/Cgl8Ikt5v5xYMfFGKqfKLtXuUAI7FiInnCO8 DC94JmlD4YOVqF1YLRhhR1Nevo1N4vI8n7LGxFHiIaF/pX0t4d0ZEs2tu1qwrmstz7gq JzN2pzjf4fDmIOHD/g9MqTYcwCOzGdBmAiKx9SR8W40zPr5QS5ss25yBYcUth1L9QTmz ydWg==; 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=1781879917; x=1782484717; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BnYwoUbk5lRv8jEgq+XXBd4eRT2Eqs4AZHW06CNgn8U=; b=eFJhaMOmJHYLUCOBGNfKn/Y+nGCj99WfD6TtCGB2DppdVDCxnWurhc7rcnLnPrz9lF lifltaEVHoXNsNuQF2+zMbVT4GS0Oeyi0ZA9RKiphdbuTyejSmzXXUhq/pbcQvBUyTQW UwINA47EPCgVTbe3gAo9Yqc6T3dAMriAx3yKAfgbYjD0KjpzevHAaA+BzrzMFAWZvLon cdU/5K/43Zo1wPjrWNPQNZVjlkCHbKlNmI0WL/kK5f0yUvWWSsxknhP7XrPTW5YKUFAg DeYYYqNh/SzGmHSwMUVKp6QWFHeb1rMA+DJvIRInPsxiHLPEd2Ok6ICUS0BS5Zpq3NKz wcXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781879917; x=1782484717; h=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=BnYwoUbk5lRv8jEgq+XXBd4eRT2Eqs4AZHW06CNgn8U=; b=JVE9vG6xpt0HLORO9Yqu/MaIf0Khbn06L01hztVYBoQlEEE1gHbZMeY0VLCAjCkrJC bmrfVhgma8HoS3yGU6FY4j99OlYPcBd+OMTbL3iTyR8sHo2lWmNgkEuWrBvmL5knxE1T KgK832vxWGdLA7xy/27LkwXm/nKHzHfZz7V6iXl12kxOcyDnxs1FLyTvpBoTVezSJGP8 sW9qCie/pN8jvC3qVqzzMt9ghyUwk7BAPTGcfvRpZQio31JOy2gFHXHNN2Da4aHtRx2T cQeQuCBpHBTFCEc0CtkNqs8FPUDdL+Rh/8gv4CJQDSahM90bu6Rk1KXQTiqTh4py+lZl xt4Q== X-Gm-Message-State: AOJu0YzjHU2DHmLaZWHeh0vkg18rLm/+moRYpXKV9VOLxT55QnDTEUQE xmP1J0EdLMM6xopFckHBs20JPu27NADVIwhCPy7FpggD+rfM0TT4nLqIG1nLii23zBBQcwLPPks ixbaic7gQNaKlQy8s4/4PXnoD0MBSE7R+xFHy X-Gm-Gg: AfdE7clwI0iy6w+wHI9iVxryYFkKXdQaxL1kFldZNphMJqKMEUpy/k4dnRfvwFCt9vQ v9PMA8Pn5ifzIXBJf5t5faKP/SijrFfpG8JRp5SDOQoRT9nDkQp4XyldVnTn9jtGVaqIeNqSa7b Fjwd/aEnHyyG5TYxIIE8KYXCXE6ORVWNURRo7sMNJ86MaGkt0S8KuNQCXnpjzsA5TrE32k06YR6 PtPjRjtMX19D7gDKXCRbGIKKWJKVca22oe9/V/FJlhhjZJ14XgbABP3HRDu2BQAbdaLxUMHjw== X-Received: by 2002:a05:6402:3548:b0:688:fd61:b1fa with SMTP id 4fb4d7f45d1cf-696e524db23mr2231227a12.19.1781879916623; Fri, 19 Jun 2026 07:38:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: dfgpostgres Date: Fri, 19 Jun 2026 10:38:25 -0400 X-Gm-Features: AVVi8CcFowkVj2EiJLc0m10p_nmEgAYNOOnDPKfk6WJOgbNHeyOlwRpNMGPDgrI Message-ID: Subject: Re: can a linux program, running on the client side, generate data to load a temp table ? To: Adrian Klaver , tgl@sss.pgh.pa.us Cc: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="000000000000767ca106549c3f42" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000767ca106549c3f42 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable >> psql's "\copy ... from program" might help you. Ya, I've used \copy for copying data in the past. But if I'm not mistaken, the "\copy... from program" runs on the server side. If I'm wrong about that, if there's a client side version of this, I'm all ears ! And FWIW, a future release that has this would be great ! plperlu might work in this case. I need the "untrusted" version because I need to dump a bytea blob out to a file, unzip it, query it (it's a SQLite DB), use the results of the query to load a temp table. So I need to make system calls that write to disk and run external programs. I work in a large corp and made the request to get that up on a DB instance. Thankfully, I already have a superuser role that might be allowed to execute the plperlu script. -dave On Thu, Jun 18, 2026 at 9:11=E2=80=AFPM Adrian Klaver wrote: > On 6/18/26 5:51 PM, dfgpostgres wrote: > > v15.5 on linux > > > > > My question is about whether or not I can get something like this to ru= n > > on the client side (where the script can be found). > > pl/plperlu?: > > https://www.postgresql.org/docs/current/plperl-trusted.html > > > > > Thanks in Advance :-) > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > --000000000000767ca106549c3f42 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>>=C2=A0 psql's "\copy ... from program" might help you.=C2=A0
Ya, = I've used \copy for copying data in the past.=C2=A0 But if I'm not = mistaken, the "\copy... from program" runs on the server side.=C2= =A0 If I'm wrong about that, if there's a client side version of th= is, I'm all ears !=C2=A0 And FWIW, a future release that has this would= be great !

plperlu might work in this case.=C2=A0 I nee= d the "untrusted" version because I need to dump a bytea blob out= to a file, unzip it, query it (it's a SQLite DB), use the results of t= he query to load a temp table.=C2=A0 So I need to make system calls that wr= ite to disk and run external programs.=C2=A0 I work in a large corp and mad= e the request to get that up on a DB instance.=C2=A0 Thankfully, I already = have a superuser role that might be allowed to execute the plperlu script.<= /div>

-dave

On Thu, Jun 18, 2= 026 at 9:11=E2=80=AFPM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 6/18/26 5:51 PM, dfgpostgres wrote:<= br> > v15.5 on linux
>

> My question is about whether or not I can get something like this to r= un
> on the client side (where the script can be found).

pl/plperlu?:

https://www.postgresql.org/docs/current/p= lperl-trusted.html

>
> Thanks in Advance :-)
>
>


--
Adrian Klaver
adrian.klave= r@aklaver.com
--000000000000767ca106549c3f42--