pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Meaning of/ handling of ECPG_NOTICE_* ??
2+ messages / 1 participants
[nested] [flat]

* Meaning of/ handling of ECPG_NOTICE_* ??
@ 2002-09-25 20:35  William West <wwest@csc.com>
  0 siblings, 0 replies; 2+ messages in thread

From: William West @ 2002-09-25 20:35 UTC (permalink / raw)
  To: pgsql-interfaces

I have some ECPG based error recovery functions
that can issue explicit  BEGIN and ROLLBACK or COMMIT
on a blind basis under some conditions. That is, BEGIN
can sometimes be issued while already in a transaction,
and  ROLLBACK or COMMIT can sometimes be issued
while not in a transaction.

It seems that I sometimes get the resulting

ECPG_NOTICE_[IN/NO]_TRANSACTION

as the sqlca.sqlcode report in my *next* INSERT/
UPDATE/ SELECT/ FETCH, rather than in sqlca.sqlcode
for the BEGIN/ ROLLBACK/COMMIT command?

Is this possible?

I am not doing anything on an asynchronous basis, at least
not on purpose. If it *is* possible, how do I tell when the
sqlca.sqlcode response for the INSERT/ UPDATE/SELECT/
FETCH command has arrived? What should I do with the
NOTICE (apparently coming from the earlier BEGIN/
ROLLBACK/COMMIT) other than log it?

[PostgreSQL 7.2.1 and ECPG 2.9.0, on RedHat 7.2, using
Unix Domain connections exclusively]




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Meaning of/ handling of ECPG_NOTICE_* ??
@ 2002-09-27 15:22  William West <wwest@csc.com>
  0 siblings, 0 replies; 2+ messages in thread

From: William West @ 2002-09-27 15:22 UTC (permalink / raw)
  To: pgsql-interfaces


I have discovered that the system on which this test was
conducted had a 7.1 PostgreSQL postmaster/ backend,
and not 7.2.1, The application was developed, built,
and tested on a 7.2.1 system, so it is (now, in hindsight)
no surprise that funny things happened with a 7.2.1
application trying to work with a 7.1 backend.

I am still curious, though, as to how/ when/ in what
context "notifications" from the backend are delivered
to an ECPG application?



                                                                                                                                              
                    William                                                                                                                   
                    West/CIV/CSC         To:     pgsql-interfaces@postgresql.org                                                              
                    @CSC                 cc:                                                                                                  
                    Sent by:             Subject:     [INTERFACES] Meaning of/ handling of ECPG_NOTICE_* ??                                   
                    pgsql-interfa                                                                                                             
                    ces-owner                                                                                                                 
                                                                                                                                              
                                                                                                                                              
                    09/25/2002                                                                                                                
                    04:35 PM                                                                                                                  
                                                                                                                                              
                                                                                                                                              




I have some ECPG based error recovery functions
that can issue explicit  BEGIN and ROLLBACK or COMMIT
on a blind basis under some conditions. That is, BEGIN
can sometimes be issued while already in a transaction,
and  ROLLBACK or COMMIT can sometimes be issued
while not in a transaction.

It seems that I sometimes get the resulting

ECPG_NOTICE_[IN/NO]_TRANSACTION

as the sqlca.sqlcode report in my *next* INSERT/
UPDATE/ SELECT/ FETCH, rather than in sqlca.sqlcode
for the BEGIN/ ROLLBACK/COMMIT command?

Is this possible?

I am not doing anything on an asynchronous basis, at least
not on purpose. If it *is* possible, how do I tell when the
sqlca.sqlcode response for the INSERT/ UPDATE/SELECT/
FETCH command has arrived? What should I do with the
NOTICE (apparently coming from the earlier BEGIN/
ROLLBACK/COMMIT) other than log it?

[PostgreSQL 7.2.1 and ECPG 2.9.0, on RedHat 7.2, using
Unix Domain connections exclusively]


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

http://www.postgresql.org/users-lounge/docs/faq.html






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-09-27 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-25 20:35 Meaning of/ handling of ECPG_NOTICE_* ?? William West <wwest@csc.com>
2002-09-27 15:22 Re: Meaning of/ handling of ECPG_NOTICE_* ?? William West <wwest@csc.com>

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