| From: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | ml(at)ft-c(dot)de |
| Cc: | pgsql-sql(at)lists(dot)postgresql(dot)org |
| Subject: | Re: send query in background |
| Date: | 2020-10-09 04:40:21 |
| Message-ID: | 20201009.134021.993095170402276383.t-ishii@sraoss.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
> 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)
>
You can use pg_send_query() of PHP.
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
| From | Date | Subject | |
|---|---|---|---|
| Next Message | James Cloos | 2020-10-09 20:01:27 | getting aroung chr(0) |
| Previous Message | ml | 2020-10-09 04:34:25 | send query in background |