pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedEcpg : caught by global sqlca
2+ messages / 2 participants
[nested] [flat]
* Ecpg : caught by global sqlca
@ 2003-01-30 08:59 Mark Kirkwood <markir@paradise.net.nz>
2003-01-30 09:45 ` Re: Ecpg : caught by global sqlca Michael Meskes <meskes@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: Mark Kirkwood @ 2003-01-30 08:59 UTC (permalink / raw)
To: pgsql-interfaces
Dear list,
I have been porting a few embedded sql programs from DB2 to Postgres.
While overall its a pretty painless exercise, I did get caught by the
global sqlca thing.
The piece of code went something like :
EXEC SQL INCLUDE sqlca;
main() {
..
struct sqlca sqlca;
..
(more code)
}
Now I found that any tests on sqlca.sqlcode within main() produced
meaningless results.
Eventually light dawned that sqlca looked like it was uninitialized, and
that I need to have something like :
EXEC SQL INCLUDE sqlca;
struct sqlca sqlca;
main()
..
This strikes me as something that would be good to mention in the Ecpg
doco - in bold type for people like me....:-)
regards
Mark
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Ecpg : caught by global sqlca
2003-01-30 08:59 Ecpg : caught by global sqlca Mark Kirkwood <markir@paradise.net.nz>
@ 2003-01-30 09:45 ` Michael Meskes <meskes@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meskes @ 2003-01-30 09:45 UTC (permalink / raw)
To: Mark Kirkwood <markir@paradise.net.nz>; +Cc: pgsql-interfaces
On Thu, Jan 30, 2003 at 09:59:14PM +1300, Mark Kirkwood wrote:
> While overall its a pretty painless exercise, I did get caught by the
> global sqlca thing.
Actually some people are already working on a thread safe sqlca
implementation which will change the whole situation.
Michael
--
Michael Meskes
Email: Michael@Fam-Meskes.De
ICQ: 179140304
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-01-30 09:45 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-01-30 08:59 Ecpg : caught by global sqlca Mark Kirkwood <markir@paradise.net.nz>
2003-01-30 09:45 ` Michael Meskes <meskes@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox