Skip to content

Commit 968d7e6

Browse files
committed
Deploying to master from @ psycopg/psycopg-website@d152452 🚀
1 parent 440b60b commit 968d7e6

File tree

7 files changed

+32
-3
lines changed

7 files changed

+32
-3
lines changed

psycopg3/docs/_sources/advanced/pipeline.rst.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,10 @@ synchronization point.
200200

201201
- COPY is not supported in pipeline mode by PostgreSQL.
202202
- `Cursor.stream()` doesn't make sense in pipeline mode (its job is the
203-
opposite of batching!)
203+
opposite of batching!).
204204
- `ServerCursor` are currently not implemented in pipeline mode.
205+
- You cannot execute :ref:`multiple statements in the same query
206+
<multi-statements>`.
205207

206208
.. note::
207209

psycopg3/docs/_sources/basic/from_pg2.rst.txt

+8
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ or a :ref:`client-side binding cursor <client-side-binding-cursors>`::
154154
... "INSERT INTO foo VALUES (%s); INSERT INTO foo VALUES (%s)",
155155
... (10, 20))
156156

157+
.. warning::
158+
159+
You cannot executeA multiple statements in the same query:
160+
161+
- when retrieving a :ref:`binary result <binary-data>` (such as using
162+
``.execute(..., binary=True)``;
163+
- when using the :ref:`pipeline mode <pipeline-mode>`.
164+
157165
.. warning::
158166

159167
If a statement must be executed outside a transaction (such as

psycopg3/docs/_sources/basic/params.rst.txt

+5
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,8 @@ in the database, such as images::
240240
cur.execute(
241241
"SELECT image_data FROM images WHERE id = %s", [image_id], binary=True)
242242
data = cur.fetchone()[0]
243+
244+
.. warning::
245+
246+
You cannot execute :ref:`multiple statements in the same query
247+
<multi-statements>` when requesting a binary result.

psycopg3/docs/advanced/pipeline.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,9 @@ <h2>Client-server messages flow<a class="headerlink" href="#client-server-messag
467467
<ul class="simple">
468468
<li><p>COPY is not supported in pipeline mode by PostgreSQL.</p></li>
469469
<li><p><a class="reference internal" href="../api/cursors.html#psycopg.Cursor.stream" title="psycopg.Cursor.stream"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Cursor.stream()</span></code></a> doesn’t make sense in pipeline mode (its job is the
470-
opposite of batching!)</p></li>
470+
opposite of batching!).</p></li>
471471
<li><p><a class="reference internal" href="../api/cursors.html#psycopg.ServerCursor" title="psycopg.ServerCursor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ServerCursor</span></code></a> are currently not implemented in pipeline mode.</p></li>
472+
<li><p>You cannot execute <a class="reference internal" href="../basic/from_pg2.html#multi-statements"><span class="std std-ref">multiple statements in the same query</span></a>.</p></li>
472473
</ul>
473474
</div>
474475
<div class="admonition note">

psycopg3/docs/basic/from_pg2.html

+9
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,15 @@
370370
</div>
371371
<div class="admonition warning">
372372
<p class="admonition-title">Warning</p>
373+
<p>You cannot executeA multiple statements in the same query:</p>
374+
<ul class="simple">
375+
<li><p>when retrieving a <a class="reference internal" href="params.html#binary-data"><span class="std std-ref">binary result</span></a> (such as using
376+
<code class="docutils literal notranslate"><span class="pre">.execute(...,</span> <span class="pre">binary=True)</span></code>;</p></li>
377+
<li><p>when using the <a class="reference internal" href="../advanced/pipeline.html#pipeline-mode"><span class="std std-ref">pipeline mode</span></a>.</p></li>
378+
</ul>
379+
</div>
380+
<div class="admonition warning">
381+
<p class="admonition-title">Warning</p>
373382
<p>If a statement must be executed outside a transaction (such as
374383
<code class="sql docutils literal notranslate"><span class="pre">CREATE</span> <span class="pre">DATABASE</span></code>), it cannot be executed in batch with other
375384
statements, even if the connection is in autocommit mode:</p>

psycopg3/docs/basic/params.html

+4
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@ <h2><code class="xref py py-obj docutils literal notranslate"><span class="pre">
449449
<span class="n">data</span> <span class="o">=</span> <span class="n">cur</span><span class="o">.</span><span class="n">fetchone</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
450450
</pre></div>
451451
</div>
452+
<div class="admonition warning">
453+
<p class="admonition-title">Warning</p>
454+
<p>You cannot execute <a class="reference internal" href="from_pg2.html#multi-statements"><span class="std std-ref">multiple statements in the same query</span></a> when requesting a binary result.</p>
455+
</div>
452456
</section>
453457
</section>
454458

psycopg3/docs/searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)