Skip site navigation (1) Skip section navigation (2)

Re: ECPG - Meaning of -400, ECPG_PGSQL?

From: "William West" <wwest(at)csc(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ECPG - Meaning of -400, ECPG_PGSQL?
Date: 2002-08-01 22:22:04
Message-ID: OFDE947402.E4DFBDF0-ON85256C08.007AB7E6@com (view raw or flat)
Thread:
Lists: pgsql-interfaces
Doh! I found the '-t' switch to 'ecpg'.

I am a 'newbie' and there is a >LOT< to read and I somehow
missed it (somehow had it in my head that the >default< was
explicit transaction BEGIN-COMMIT).
.



                                                                                                                                              
                    William                                                                                                                   
                    West/CIV/CSC         To:     pgsql-interfaces(at)postgresql(dot)org                                                              
                    @CSC                 cc:                                                                                                  
                    Sent by:             Subject:     [INTERFACES] ECPG - Meaning of -400, ECPG_PGSQL?                                        
                    pgsql-interfa                                                                                                             
                    ces-owner                                                                                                                 
                                                                                                                                              
                                                                                                                                              
                    07/31/2002                                                                                                                
                    07:48 PM                                                                                                                  
                                                                                                                                              
                                                                                                                                              




Goal is to TRUNCATE table, then DROP table, then
VACUUM (everything) then (re)ADD table as part of
an ECPG application's initialization.

From psql, this strategy works just fine, but not from the
ECPG application.

EXEC SQL VACUUM or EXEC SQL TRUNCATE TABLE
gives ecpg program error -400. The message that comes
with it says two different things:

For VACUUM, it says sqlca -400 with sqlca text reading:

'VACUUM cannot run inside a BEGIN/END block'

For TRUNCATE it says sqlca -400 with sqlca text reading:

'TRUNCATE TABLE cannot run inside a transaction block'

These same messages appear in the server log.

Have tried positioning these statements immediately
after the CONNECT, same result.

Have also tried EXEC SQL COMMIT prior to each,
same result.

What could have begun the block the server has in
effect, if it is immediately after a CONNECT?

Shouldn't a COMMIT end any transactions anyway?


---------------------------(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)




pgsql-interfaces by date

Next:From: Brett SchwarzDate: 2002-08-01 23:37:28
Subject: Re: [pgaccess-users] pgaccess BusinessExchange
Previous:From: guntherDate: 2002-08-01 20:42:14
Subject: Fw: charming Love to share

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group