[Gambas-user] Transaction processing in Postgresql

alan alan at ...833...
Thu Feb 3 12:13:51 CET 2005


I am  trying to move an ACCESS database to GAMBAS & POSTGRESQL.
As part of this process I want to change the order of the rows in some 
of the tables
to match the order of the primary key.

The following SQL command when submitted  via PGADMINIII will achive  
this objective:-

BEGIN;
SELECT * INTO  TEMP footemp   FROM  foo ORDER BY foo_id;
DELETE  FROM foo;
INSERT INTO foo  SELECT *  FROM footemp;
DROP TABLE footemp;
COMMIT;
 
This process has to be performed inside a transaction because there are 
constrants
in other tables in the database  which require some of the values in foo.

When i try to execute the sql commands from within gambas the 
transaction fails
at the first deletion with an error indicating a broken constaint.

Does this mean  gambas connot handle transactions?

alan






More information about the User mailing list