Unix Technical Forum

pgsql: Add a new system view, pg_cursors, that displays the currently

This is a discussion on pgsql: Add a new system view, pg_cursors, that displays the currently within the pgsql Committers forums, part of the PostgreSQL category; --> Log Message: ----------- Add a new system view, pg_cursors, that displays the currently available cursors. Patch from Joachim Wieland, ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Committers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 06:50 PM
Neil Conway
 
Posts: n/a
Default pgsql: Add a new system view, pg_cursors, that displays the currently

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/doc/src/sgml:
catalogs.sgml (r2.117 -> r2.118)
(http://developer.postgresql.org/cvsw...2.117&r2=2.118)
protocol.sgml (r1.62 -> r1.63)
(http://developer.postgresql.org/cvsw...1=1.62&r2=1.63)
pgsql/doc/src/sgml/ref:
close.sgml (r1.22 -> r1.23)
(http://developer.postgresql.org/cvsw...1=1.22&r2=1.23)
declare.sgml (r1.33 -> r1.34)
(http://developer.postgresql.org/cvsw...1=1.33&r2=1.34)
pgsql/src/backend/catalog:
system_views.sql (r1.24 -> r1.25)
(http://developer.postgresql.org/cvsw...1=1.24&r2=1.25)
pgsql/src/backend/commands:
portalcmds.c (r1.44 -> r1.45)
(http://developer.postgresql.org/cvsw...1=1.44&r2=1.45)
prepare.c (r1.46 -> r1.47)
(http://developer.postgresql.org/cvsw...1=1.46&r2=1.47)
pgsql/src/backend/executor:
spi.c (r1.145 -> r1.146)
(http://developer.postgresql.org/cvsw...1.145&r2=1.146)
pgsql/src/backend/tcop:
postgres.c (r1.478 -> r1.479)
(http://developer.postgresql.org/cvsw...1.478&r2=1.479)
pgsql/src/backend/utils/mmgr:
portalmem.c (r1.83 -> r1.84)
(http://developer.postgresql.org/cvsw...1=1.83&r2=1.84)
pgsql/src/include/catalog:
catversion.h (r1.311 -> r1.312)
(http://developer.postgresql.org/cvsw...1.311&r2=1.312)
pg_proc.h (r1.391 -> r1.392)
(http://developer.postgresql.org/cvsw...1.391&r2=1.392)
pgsql/src/include/utils:
builtins.h (r1.270 -> r1.271)
(http://developer.postgresql.org/cvsw...1.270&r2=1.271)
portal.h (r1.57 -> r1.58)
(http://developer.postgresql.org/cvsw...1=1.57&r2=1.58)
pgsql/src/test/regress/expected:
portals.out (r1.9 -> r1.10)
(http://developer.postgresql.org/cvsw...r1=1.9&r2=1.10)
rules.out (r1.112 -> r1.113)
(http://developer.postgresql.org/cvsw...1.112&r2=1.113)
pgsql/src/test/regress/sql:
portals.sql (r1.6 -> r1.7)
(http://developer.postgresql.org/cvsw...?r1=1.6&r2=1.7)

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:30 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com