From: | Randall Jonasz <rjonasz(at)click2net(dot)com> |
---|---|
To: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: C++ usage question |
Date: | 2001-05-25 23:43:27 |
Message-ID: | Pine.BSF.4.21.0105251938190.51740-100000@nietzsche.jaded.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
1) What I've been forced to do by avoiding the need for extra database
objects is to save each sql cmd while iterating over a result from a query
and then executing each sql cmd sequentially.
2) yes
Hope this helps!
Randy
Software Engineer
Click2net Inc.
201-1599 Hurontario St.
Mississauga ON
Canada
On Fri, 25 May 2001, Patrick Welche wrote:
> Within a C++ program I essentially do
>
> PgDatabase db ("dbname=sameone")
> PgDatabase db2("dbname=sameone")
>
> db.Exec("BEGIN")
> db.Exec(select)
> loop over db.Tuples()
> db2.Exec(query involving results from db)
> do stuff with db2 result
>
> db.Exec("COMMIT")
>
> 1) Is the way to keep to results really to have 2 PgDatabase, or is there a
> simple way of saving the result set before having it replaced by the next
> query?
>
> 2) Does that BEGIN/COMMIT just apply to the queries in db, the db2 queries
> each automatically having their own transaction?
>
> I know I can experiment to find out, but maybe one of you already knows the
> answer...
>
> Cheers,
>
> Patrick
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | SAKAIDA | 2001-05-26 13:08:23 | String array type in ecpg. |
Previous Message | Erny | 2001-05-25 20:30:25 | Meta info for queries |