git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 558bc25) | patch
Add a new system view, pg_cursors, that displays the currently available
2006年1月18日 06:49:30 +0000 (06:49 +0000)
2006年1月18日 06:49:30 +0000 (06:49 +0000)
commit 33e06ebccbc21677be6dbc112e3d150bd13b17cb
Add a new system view, pg_cursors, that displays the currently available
cursors. Patch from Joachim Wieland, review and ediorialization by Neil
Conway. The view lists cursors defined by DECLARE CURSOR, using SPI, or
via the Bind message of the frontend/backend protocol. This means the
view does not list the unnamed portal or the portal created to implement
EXECUTE. Because we do list SPI portals, there might be more rows in
this view than you might expect if you are using SPI implicitly (e.g.
via a procedural language).

Per recent discussion on -hackers, the query string included in the
view for cursors defined by DECLARE CURSOR is based on
debug_query_string. That means it is not accurate if multiple queries
separated by semicolons are submitted as one query string. However,
there doesn't seem a trivial fix for that: debug_query_string
is better than nothing. I also changed SPI_cursor_open() to include
the source text for the portal it creates: AFAICS there is no reason
not to do this.

Update the documentation and regression tests, bump the catversion.
17 files changed:
doc/src/sgml/catalogs.sgml diff | blob | blame | history
doc/src/sgml/protocol.sgml diff | blob | blame | history
doc/src/sgml/ref/close.sgml diff | blob | blame | history
doc/src/sgml/ref/declare.sgml diff | blob | blame | history
src/backend/catalog/system_views.sql diff | blob | blame | history
src/backend/commands/portalcmds.c diff | blob | blame | history
src/backend/commands/prepare.c diff | blob | blame | history
src/backend/executor/spi.c diff | blob | blame | history
src/backend/tcop/postgres.c diff | blob | blame | history
src/backend/utils/mmgr/portalmem.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_proc.h diff | blob | blame | history
src/include/utils/builtins.h diff | blob | blame | history
src/include/utils/portal.h diff | blob | blame | history
src/test/regress/expected/portals.out diff | blob | blame | history
src/test/regress/expected/rules.out diff | blob | blame | history
src/test/regress/sql/portals.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /