From: | "Philippe Lang" <philippe(dot)lang(at)attiksystem(dot)ch> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Access, pass-through queries and isolation level |
Date: | 2003-11-06 10:26:32 |
Message-ID: | 6C0CF58A187DA5479245E0830AF84F420AF72F@poweredge.attiksystem.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hello,
I'm not sure if this problem is related to ODBC or Access...
Imagine we have the following function: (Note: I know about the serial type, this is juste for illustration purpose...)
----------------------------------
CREATE OR REPLACE FUNCTION public.func_test_insert() RETURNS int8 AS
'
DECLARE
next_id int8;
BEGIN
next_id = max(func_test_data.id)+1;
insert into public."func_test_data" values(next_id);
RETURN next_id;
END;
'
LANGUAGE 'plpgsql' VOLATILE;
----------------------------------
From the query tool of pgAdmin, or with a pass-through query in Access 2000, I can call:
select * from public."func_test_insert"();
... without a problem. I get the inserted id back.
Now if I want to change the isolation level before:
set transaction isolation level serializable;
select * from public."func_test_insert"();
... I cannot get the inserted id back in Access, from the pass-through query. Apprently, since the first query does not return any row, Access considers the whole query does not return anything.
Anything I can do agains that? Using explicit "BEGIN WORK, COMMIT WORK" does not help. And of course, I cannot put "set transaction isolation level serializable;" in the function, since PG does not support nested transactions.
Philippe Lang
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Eckermann | 2003-11-06 15:34:47 | Re: Access, pass-through queries and isolation level |
Previous Message | Hiroshi Inoue | 2003-11-05 21:43:47 | Re: bug in EN_set_odbc3 macro |