Unix Technical Forum

Query tool result discarding

This is a discussion on Query tool result discarding within the pgsql Interfaces Pgadmin Hackers forums, part of the PostgreSQL category; --> Hi! A fairly typical use-case for the query tool in my org is: BEGIN TRANSACTION; UPDATE something SET somecol=newval ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces Pgadmin Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 05:57 PM
Magnus Hagander
 
Posts: n/a
Default Query tool result discarding

Hi!


A fairly typical use-case for the query tool in my org is:

BEGIN TRANSACTION;
UPDATE something SET somecol=newval WHERE something=other;
SELECT * FROM something; -- this is to manually verify results
ROLLBACK;

Then when everything works, you replace ROLLBACK with COMMIT. This works
perfectly in the query tool in sqlserver, but pgAdmin discards the
result from SELECT and leaves the result pane empty. Because it's
overwritten by the empty result from ROLLBACK.

Attached patch fixes this very limited test case. I'm well enough
unfamiliar with that code that I think it's probably not the correct
solution "in the big scheme" (and it also seems too easy), but it might
help point one of you guys who know that code better in the right
direction. Or on the off chance that it's right, hey, there was some
luck left over :-)

//Magnus


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

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 11:51 PM.


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