agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Franz Timmer <ftimmer@ft-c.de>
To: pgsql-sql@lists.postgresql.org
Subject: send query in background
Date: Fri, 9 Oct 2020 06:31:49 +0200
Message-ID: <44c27f2a-d010-fb71-5410-359f75475660@ft-c.de> (raw)
hallo,
I have one pg function (a long running sql query), it is running few
minutes. I start it from webserver via PHP.
My question: Is there a possibility, that this function runs in
background. PG send back a immidiately return and do the work after this
answer.
like linux/bash commands with an ampersand "&" at the and of the line.
The user get a prompt and can prozess his work.
When the user push the button on the website to start the sql-script, he
can process his work.
I work with v11.8, but it is possible to update to v12.
(google found some answers, but these a 10 years old)
Franz
view thread (3+ messages) latest in thread
Message-ID: <44c27f2a-d010-fb71-5410-359f75475660@ft-c.de>
Permalink: ../44c27f2a-d010-fb71-5410-359f75475660@ft-c.de/
Also on: postgresql.org/message-id/44c27f2a-d010-fb71-5410-359f75475660@ft-c.de
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ftimmer@ft-c.de, pgsql-sql@lists.postgresql.org
Subject: Re: send query in background
In-Reply-To: <44c27f2a-d010-fb71-5410-359f75475660@ft-c.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox