473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Functions and Commits

3
I have been reading through all the threads and trying a few different things. Essentially, I have a function that loops through a table and then performs some updates/inserts against other tables based on the row from the FOR LOOP.

Currently, none of these inserts/updates are visible to other users until the LOOP and function are complete (i.e. the end of the function is the commit).
However, I would like to make these insert/updates visible as soon as a row in the for loop is complete. Is this possible? or is this the problem of a nested transaction?

I am about to try dblink. Is there anyway to accomplish this?
Feb 22 '07 #1
1 1343
michaelb
534 Expert 512MB
Nested transactions are (kind of) supported in the latest versions of Postgres.
This involves usage of savepoints and I think it may have a negative impact on performance when you processing a big volume of data.
If you want to try it check out read this

It is quite common to make updates available when entire transaction is complete.
I wonder why are you trying to do this, does this update takes a very long time, or is there some other reason?
Perhaps it would help if you describe the problem before committing to a specific solution, like dblink, or nested transactions.
Feb 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: hokiegal99 | last post by:
A few questions about the following code. How would I "wrap" this in a function, and do I need to? Also, how can I make the code smart enough to realize that when a file has 2 or more bad...
0
by: Y2KYZFR1 | last post by:
Granted this only stopps the "forgetfull". I tested it against the following clients, all of which supply a DIFFERENT "no message" string. WinCVS 1.3.14.1 Beta 14 ( Build 1 ) TortioseCVS...
12
by: Me | last post by:
Hi, I would like learn from people with experience in C++, which of the following styles of way to construct "get/set" member functions would be the best in terms of usability, speed, et cetera. ...
2
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to...
4
by: Re_endian_miss | last post by:
I know even less about databases than I thought... I always thought that the idea behind a transaction was that the actual table in question does NOT get updated until a commit is issued (either...
7
by: Tim ffitch | last post by:
Hi I have created a VB dll file that contains common functions I use across various projects in VB, Access and Excel. Rather than have to code the functions in each I decided to use the dll...
23
by: Timothy Madden | last post by:
Hello all. I program C++ since a lot of time now and I still don't know this simple thing: what's the problem with local functions so they are not part of C++ ? There surely are many people...
8
by: veffen | last post by:
Hello all, I'm trying to call the snapshot table function SNAP_GET_TBSP via a jdbc connection using the following query: SELECT * FROM TABLE(SNAP_GET_TBSP(CAST(NULL AS VARCHAR(1), -1)) AS T ...
0
by: wesley chun | last post by:
have you guys seen this on Slashdot yet? (i did a quick search in the archives and haven't seen any posts yet so hopefully this isn't a duplicate msg!) ...
7
by: Immortal Nephi | last post by:
My project grows large when I put too many member functions into one class. The header file and source code file will have approximately 50,000 lines when one class contains thousand member...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.