|
702 | 702 | </span> |
703 | 703 | </a> |
704 | 704 |
|
| 705 | +</li> |
| 706 | + |
| 707 | + <li class="md-nav__item"> |
| 708 | + <a href="#builtin-copytoprogram" class="md-nav__link"> |
| 709 | + <span class="md-ellipsis"> |
| 710 | + BUILTIN: CopyToProgram |
| 711 | + </span> |
| 712 | + </a> |
| 713 | + |
| 714 | +</li> |
| 715 | + |
| 716 | + <li class="md-nav__item"> |
| 717 | + <a href="#builtin-copyfromprogram" class="md-nav__link"> |
| 718 | + <span class="md-ellipsis"> |
| 719 | + BUILTIN: CopyFromProgram |
| 720 | + </span> |
| 721 | + </a> |
| 722 | + |
705 | 723 | </li> |
706 | 724 |
|
707 | 725 | <li class="md-nav__item"> |
|
1318 | 1336 | </span> |
1319 | 1337 | </a> |
1320 | 1338 |
|
| 1339 | +</li> |
| 1340 | + |
| 1341 | + <li class="md-nav__item"> |
| 1342 | + <a href="#builtin-copytoprogram" class="md-nav__link"> |
| 1343 | + <span class="md-ellipsis"> |
| 1344 | + BUILTIN: CopyToProgram |
| 1345 | + </span> |
| 1346 | + </a> |
| 1347 | + |
| 1348 | +</li> |
| 1349 | + |
| 1350 | + <li class="md-nav__item"> |
| 1351 | + <a href="#builtin-copyfromprogram" class="md-nav__link"> |
| 1352 | + <span class="md-ellipsis"> |
| 1353 | + BUILTIN: CopyFromProgram |
| 1354 | + </span> |
| 1355 | + </a> |
| 1356 | + |
1321 | 1357 | </li> |
1322 | 1358 |
|
1323 | 1359 | <li class="md-nav__item"> |
@@ -1412,6 +1448,8 @@ <h3 id="builtin"><code>BUILTIN</code></h3> |
1412 | 1448 | <li><em>Download</em></li> |
1413 | 1449 | <li><em>CopyFromFile</em></li> |
1414 | 1450 | <li><em>CopyToFile</em></li> |
| 1451 | +<li><em>CopyFromProgram</em></li> |
| 1452 | +<li><em>CopyToProgram</em></li> |
1415 | 1453 | <li><em>Shutdown</em></li> |
1416 | 1454 | </ul> |
1417 | 1455 | <h2 id="task">Task</h2> |
@@ -1584,6 +1622,24 @@ <h4 id="builtin-copytofile"><code>BUILTIN: CopyToFile</code></h4> |
1584 | 1622 | <a id="__codelineno-7-3" name="__codelineno-7-3" href="#__codelineno-7-3"></a><span class="s1"> "filename": "download/location.txt" </span> |
1585 | 1623 | <a id="__codelineno-7-4" name="__codelineno-7-4" href="#__codelineno-7-4"></a><span class="s1">}'</span><span class="p">::</span><span class="n">jsonb</span> |
1586 | 1624 | </code></pre></div> |
| 1625 | +<h4 id="builtin-copytoprogram"><code>BUILTIN: CopyToProgram</code></h4> |
| 1626 | +<p>Schema: <code>object</code></p> |
| 1627 | +<p>Example:</p> |
| 1628 | +<div class="highlight"><pre><span></span><code><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a><span class="s1">'{</span> |
| 1629 | +<a id="__codelineno-8-2" name="__codelineno-8-2" href="#__codelineno-8-2"></a><span class="s1"> "sql": "COPY location TO STDOUT",</span> |
| 1630 | +<a id="__codelineno-8-3" name="__codelineno-8-3" href="#__codelineno-8-3"></a><span class="s1"> "cmd": "gzip",</span> |
| 1631 | +<a id="__codelineno-8-4" name="__codelineno-8-4" href="#__codelineno-8-4"></a><span class="s1"> "args": ["-c", ">", "/tmp/output.gz"]</span> |
| 1632 | +<a id="__codelineno-8-5" name="__codelineno-8-5" href="#__codelineno-8-5"></a><span class="s1">}'</span><span class="p">::</span><span class="n">jsonb</span> |
| 1633 | +</code></pre></div> |
| 1634 | +<h4 id="builtin-copyfromprogram"><code>BUILTIN: CopyFromProgram</code></h4> |
| 1635 | +<p>Schema: <code>object</code></p> |
| 1636 | +<p>Example:</p> |
| 1637 | +<div class="highlight"><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a><span class="s1">'{</span> |
| 1638 | +<a id="__codelineno-9-2" name="__codelineno-9-2" href="#__codelineno-9-2"></a><span class="s1"> "sql": "COPY location FROM STDIN",</span> |
| 1639 | +<a id="__codelineno-9-3" name="__codelineno-9-3" href="#__codelineno-9-3"></a><span class="s1"> "cmd": "gunzip",</span> |
| 1640 | +<a id="__codelineno-9-4" name="__codelineno-9-4" href="#__codelineno-9-4"></a><span class="s1"> "args": ["-c", "/tmp/data.gz"]</span> |
| 1641 | +<a id="__codelineno-9-5" name="__codelineno-9-5" href="#__codelineno-9-5"></a><span class="s1">}'</span><span class="p">::</span><span class="n">jsonb</span> |
| 1642 | +</code></pre></div> |
1587 | 1643 | <h4 id="builtin-shutdown"><code>BUILTIN: Shutdown</code></h4> |
1588 | 1644 | <p>value ignored</p> |
1589 | 1645 | <h4 id="builtin-noop"><code>BUILTIN: NoOp</code></h4> |
@@ -1657,10 +1713,10 @@ <h3 id="table-timetablechain">Table timetable.chain</h3> |
1657 | 1713 | <p>All chains in <strong>pg_timetable</strong> are scheduled at the PostgreSQL server time zone. |
1658 | 1714 | You can change the <a href="https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TIMEZONES">timezone</a> |
1659 | 1715 | for the <strong>current session</strong> when adding new chains, e.g.</p> |
1660 | | -<div class="highlight"><pre><span></span><code><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a><span class="k">SET</span><span class="w"> </span><span class="k">TIME</span><span class="w"> </span><span class="k">ZONE</span><span class="w"> </span><span class="s1">'UTC'</span><span class="p">;</span> |
1661 | | -<a id="__codelineno-8-2" name="__codelineno-8-2" href="#__codelineno-8-2"></a> |
1662 | | -<a id="__codelineno-8-3" name="__codelineno-8-3" href="#__codelineno-8-3"></a><span class="c1">-- Run VACUUM at 00:05 every day in August UTC</span> |
1663 | | -<a id="__codelineno-8-4" name="__codelineno-8-4" href="#__codelineno-8-4"></a><span class="k">SELECT</span><span class="w"> </span><span class="n">timetable</span><span class="p">.</span><span class="n">add_job</span><span class="p">(</span><span class="s1">'execute-func'</span><span class="p">,</span><span class="w"> </span><span class="s1">'5 0 * 8 *'</span><span class="p">,</span><span class="w"> </span><span class="s1">'VACUUM'</span><span class="p">);</span> |
| 1716 | +<div class="highlight"><pre><span></span><code><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="k">SET</span><span class="w"> </span><span class="k">TIME</span><span class="w"> </span><span class="k">ZONE</span><span class="w"> </span><span class="s1">'UTC'</span><span class="p">;</span> |
| 1717 | +<a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a> |
| 1718 | +<a id="__codelineno-10-3" name="__codelineno-10-3" href="#__codelineno-10-3"></a><span class="c1">-- Run VACUUM at 00:05 every day in August UTC</span> |
| 1719 | +<a id="__codelineno-10-4" name="__codelineno-10-4" href="#__codelineno-10-4"></a><span class="k">SELECT</span><span class="w"> </span><span class="n">timetable</span><span class="p">.</span><span class="n">add_job</span><span class="p">(</span><span class="s1">'execute-func'</span><span class="p">,</span><span class="w"> </span><span class="s1">'5 0 * 8 *'</span><span class="p">,</span><span class="w"> </span><span class="s1">'VACUUM'</span><span class="p">);</span> |
1664 | 1720 | </code></pre></div> |
1665 | 1721 | </div> |
1666 | 1722 |
|
|
0 commit comments