Re: can a linux program, running on the client side, generate data to load a temp table ?

From: dfgpostgres <dfgpostgres3(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can a linux program, running on the client side, generate data to load a temp table ?
Date: 2026-06-19 14:38:25
Message-ID: CAAcmDX_rLTkONAR_eGJcoWzzv0UvM5gr7hvo=qeWfw2Q3YZvrw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> 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 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
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 run
> > 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(dot)klaver(at)aklaver(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2026-06-19 14:48:19 Re: can a linux program, running on the client side, generate data to load a temp table ?
Previous Message Ron Johnson 2026-06-19 12:48:31 Re: Can use NFS mount partition for Pgbackrest Repo -path ?