|
1 | 1 | <!--
|
2 | 2 | Documentation of the system catalogs, directed toward PostgreSQL developers
|
3 |
| - $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.117 2006/01/16 18:15:30 neilc Exp $ |
| 3 | + $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.118 2006/01/18 06:49:25 neilc Exp $ |
4 | 4 | -->
|
5 | 5 |
|
6 | 6 | <chapter id="catalogs">
|
|
4359 | 4359 | </thead>
|
4360 | 4360 |
|
4361 | 4361 | <tbody>
|
| 4362 | + <row> |
| 4363 | + <entry><link linkend="view-pg-cursors"><structname>pg_cursors</structname></link></entry> |
| 4364 | + <entry>open cursors</entry> |
| 4365 | + </row> |
| 4366 | + |
4362 | 4367 | <row>
|
4363 | 4368 | <entry><link linkend="view-pg-group"><structname>pg_group</structname></link></entry>
|
4364 | 4369 | <entry>groups of database users</entry>
|
|
4429 | 4434 | </table>
|
4430 | 4435 | </sect1>
|
4431 | 4436 |
|
| 4437 | + <sect1 id="view-pg-cursors"> |
| 4438 | + <title><structname>pg_cursors</structname></title> |
| 4439 | + |
| 4440 | + <indexterm zone="view-pg-cursors"> |
| 4441 | + <primary>pg_cursors</primary> |
| 4442 | + </indexterm> |
| 4443 | + |
| 4444 | + <para> |
| 4445 | + The <structname>pg_cursors</structname> view lists the cursors that |
| 4446 | + are currently available. Cursors can be defined in several ways: |
| 4447 | + <itemizedlist> |
| 4448 | + <listitem> |
| 4449 | + <para> |
| 4450 | + via the <xref linkend="sql-declare" endterm="sql-declare-title"> |
| 4451 | + statement in SQL |
| 4452 | + </para> |
| 4453 | + </listitem> |
| 4454 | + |
| 4455 | + <listitem> |
| 4456 | + <para> |
| 4457 | + via the Bind message in the frontend/backend protocol, as |
| 4458 | + described in <xref linkend="protocol-flow-ext-query"> |
| 4459 | + </para> |
| 4460 | + </listitem> |
| 4461 | + |
| 4462 | + <listitem> |
| 4463 | + <para> |
| 4464 | + via the Server Programming Interface (SPI), as described in |
| 4465 | + <xref linkend="spi-interface"> |
| 4466 | + </itemizedlist> |
| 4467 | + |
| 4468 | + The <structname>pg_cursors</structname> view displays cursors |
| 4469 | + created by any of these means. Cursors only exist for the duration |
| 4470 | + of the transaction that defines them, unless they have been |
| 4471 | + declared <literal>WITH HOLD</literal>. Therefore non-holdable |
| 4472 | + cursors are only present in the view until the end of their |
| 4473 | + creating transaction. |
| 4474 | + |
| 4475 | + <note> |
| 4476 | + <para> |
| 4477 | + Cursors are used internally to implement some of the components |
| 4478 | + of <productname>PostgreSQL</>, such as procedural languages. |
| 4479 | + Therefore, the <structname>pg_cursors</> view may include cursors |
| 4480 | + that have not been explicitly created by the user. |
| 4481 | + </para> |
| 4482 | + </note> |
| 4483 | + </para> |
| 4484 | + |
| 4485 | + <table> |
| 4486 | + <title><structname>pg_cursors</> Columns</title> |
| 4487 | + |
| 4488 | + <tgroup cols=4> |
| 4489 | + <thead> |
| 4490 | + <row> |
| 4491 | + <entry>Name</entry> |
| 4492 | + <entry>Type</entry> |
| 4493 | + <entry>References</entry> |
| 4494 | + <entry>Description</entry> |
| 4495 | + </row> |
| 4496 | + </thead> |
| 4497 | + |
| 4498 | + <tbody> |
| 4499 | + <row> |
| 4500 | + <entry><structfield>name</structfield></entry> |
| 4501 | + <entry><type>text</type></entry> |
| 4502 | + <entry></entry> |
| 4503 | + <entry>The name of the cursor</entry> |
| 4504 | + </row> |
| 4505 | + |
| 4506 | + <row> |
| 4507 | + <entry><structfield>statement</structfield></entry> |
| 4508 | + <entry><type>text</type></entry> |
| 4509 | + <entry></entry> |
| 4510 | + <entry>The verbatim query string submitted to declare this cursor</entry> |
| 4511 | + </row> |
| 4512 | + |
| 4513 | + <row> |
| 4514 | + <entry><structfield>is_holdable</structfield></entry> |
| 4515 | + <entry><type>boolean</type></entry> |
| 4516 | + <entry></entry> |
| 4517 | + <entry> |
| 4518 | + <literal>true</literal> if the cursor is holdable (that is, it |
| 4519 | + can be accessed after the transaction that declared the cursor |
| 4520 | + has committed); <literal>false</literal> otherwise |
| 4521 | + </entry> |
| 4522 | + </row> |
| 4523 | + |
| 4524 | + <row> |
| 4525 | + <entry><structfield>is_binary</structfield></entry> |
| 4526 | + <entry><type>boolean</type></entry> |
| 4527 | + <entry></entry> |
| 4528 | + <entry> |
| 4529 | + <literal>true</literal> if the cursor was declared |
| 4530 | + <literal>BINARY</literal>; <literal>false</literal> |
| 4531 | + otherwise |
| 4532 | + </entry> |
| 4533 | + </row> |
| 4534 | + |
| 4535 | + <row> |
| 4536 | + <entry><structfield>is_scrollable</structfield></entry> |
| 4537 | + <entry><type>boolean</type></entry> |
| 4538 | + <entry></entry> |
| 4539 | + <entry> |
| 4540 | + <literal>true</> if the cursor is scrollable (that is, it |
| 4541 | + allows rows to be retrieved in a nonsequential manner); |
| 4542 | + <literal>false</literal> otherwise |
| 4543 | + </entry> |
| 4544 | + </row> |
| 4545 | + |
| 4546 | + <row> |
| 4547 | + <entry><structfield>creation_time</structfield></entry> |
| 4548 | + <entry><type>timestamptz</type></entry> |
| 4549 | + <entry></entry> |
| 4550 | + <entry>The time at which the cursor was declared</entry> |
| 4551 | + </row> |
| 4552 | + </tbody> |
| 4553 | + </tgroup> |
| 4554 | + </table> |
| 4555 | + |
| 4556 | + <para> |
| 4557 | + The <structname>pg_cursors</structname> view is read only. |
| 4558 | + </para> |
| 4559 | + |
| 4560 | + </sect1> |
| 4561 | + |
4432 | 4562 | <sect1 id="view-pg-group">
|
4433 | 4563 | <title><structname>pg_group</structname></title>
|
4434 | 4564 |
|
|
0 commit comments